Whey protein powder lasts a good long time, possibly as long as a couple of years, but it should not be used once the manufacturers expiry date is exceeded.
Casein protein powder can last a very long time, possibly up to a couple of years. However, referrer to the manufacturers expiry date for best results.