Originally it was a long guarded secret by an unnamed and supposedly non-existent government agency, but having penetrated their firewall defense structure, I have obtained that knowledge.
Its called Google. http://www.google.com/ (Hopefully you did not need that link.)
A good portion of the time if you enter the merchant name and the code itself, and then look at the first page or two of results, the expiration date for that code becomes clear.
(Sometimes quotations help around the code if its comprised of two words put together.)
Keep in mind that some merchants recycle old codes, placing new expiration dates on them, so sometimes a newly released code will appear with an old expiration in the results.
If the code is something really common as a word, such as "BONUS", you can try, but the expiration will probably be buried under lots of other results that are hard to wade through.