The code shouldn't expire, but they are only good once.
Whenever my dad buys movies that come with a digital copy, I get it. When he bought Star Trek last year, the digital wouldn't work. It turns out that a bunch of the codes were leaked/sold by employees of the studio. Depending on where you bought the disc from, I'd contact the retailer. Amazon got my Dad another code. But also on the Star Trek discs, it was widely publicized that there were some codes distributed illegally.