Credits do not expire. However, their chance of transferring into a program may decrease with time.
For example, major class credits are evergreen as they can be easily transferred between schools. Science, Technology, Engineering, and Math (STEM) courses have a shelf life of 10 years while graduate courses can be transferred for 7 years.