The code shouldn't expire. As long as you have an active account on your game console be it a PS4 or Xbox One, you should be able to install and play the game whenever you want. The only downloads that expire are the free ones from PS+ or Xbox Live (if your subscription expires and you don't renew it).