I thought bought keys didn't have an expiry date, only the freebie giveaways. Now I need to check my gift keys...
There are 2 kind of keys GOG uses.
1) Gift codes, which are purchased, can be partially redeeemed, and do not expire. They are 20 character hexadecimal ones.
2) Bonus codes, which are created by the staff, usually for promotion or developers, cannot be partially redeemed, and do expire. They are 10 (I think) character hexadecimal ones.
If you buy a code from another reseller, it should be a Bonus code. If it is a gift code, it's an individual selling it. Bonus codes can be either from developers or from individuals.
Edit: As ZFR pointed out, the gift codes are 20 character hexadecimal ones, not 25 alphanumerical.