Studies have shown that Epi pens retain most of their efficacy over time. Many two and three-year-old Epi pens, for example, still retain about 90% of their efficacy. If you need one (i.e. your child is anaphylaxing, and you only have expired Epi pens), using an expired Epi pen is a much better option than doing nothing.
More details on the study which looked at the efficacy of old Epi pens can be found below:
https://www.medpagetoday.com/allergyimmunology/allergy/65124