I think the regular gift codes that you buy with your own money don't have an expiration date; in any case I still have a valid gift code bought in 2011. The free codes you get during this sale (System Shock 2, Riddick, Banished) are only valid until Dec 15.
Unfortunately, sometimes games get removed from the GOG catalogue due to license issues, but those games stay accessible for those who already own it. I'm not sure how that affects gift codes, but I think they'd remain vaild, too, at least in most cases. If some extras like the soundtrack get removed though and the user didn't get a chance to download them before that, they will be missing in the gifted version, too. Not that these things happen a lot, but they do happen
once in a while.
Oh, and you can test the validity of your codes yourself, without redeeming them. Just go to
the redeem page, insert your code and it will show the expiration date (ideally "NEVER"). Then press "cancel". (The description is a bit ambiguous, but don't worry. Checking out what's on the code does not render it "used", only "in use" for a certain time, until you cancel the process. You'd still need to confirm that you actually want to redeem it, before the code is "used".)