That said, you could just put zinc oxide sunblock on your helmet and then protect the UV-blocking layer with a spray urethane top-coat, and thereby extend the useful lifespan of your helmet by years.
Can't really do much about O2 damage or migration of plasticizers, though, unless you want to freeze your helmet any time you're not wearing it. Keeping it in an air-conditioned interior room rather than a hot garage or bike locker might help.
EPS can last quite a while when buried, where it is protected from UV, excessive O2, or heat extremes, but I wouldn't entirely trust an EPS helmet beyond 10 years. It's not so much that EPS can't last that long, but that you can't guarantee that it hasn't encountered environmental conditions that would result in degradation over longer time spans. Better a 10-year-old helmet than no helmet, though. There's no excuse for doing that when municipalities sometimes just give away free (to the recipient) bicycle helmets, maybe with sponsorship by an insurer or National Safety Council or similar organization.
Please don't fuck about with safety critical equipment.
While following up, I discovered that what I suggested is patented. US 6884501.
Anyway, please don't ask people not to hack on a site with "Hacker" in the title. You are free to replace your own expanded-polystyrene bike helmets on a schedule set by helmet manufacturers and cyclist-targeting publications, if you choose. I believe that if a helmet shows no outward signs of degradation or damage, and no known incidences of impacts, there is no particular need to replace it. Just use it until it's dirty, damaged, or unfashionable, and replace it then.
There aren't a lot of studies on the real-world effectiveness of factory-new bike helmets, and as far as I know, none that actually support any particular expiration date for them. Even Snell admits that their 5-year guideline is based on "consensus" and "prudence", and not any actual evidence [0]. And one of the arguments is literally that "we will probably have better helmets available five years from now". Having been around longer than that, it just isn't true (at the price point where I buy helmets). The bike helmet I have now is largely the same as the one I had as a kid. More holes. More fashionable. More comfortable. Functionally the same. Wrap skull in 2" shell of expanded polystyrene, and put a cover over it.
Keep your helmet cool, clean, and out of direct sunlight, and it will last longer than five years. Prophylactically treating one of the well-known causes of failure in expanded polystyrene, immediately after purchase, will help.
Anyone who cycles frequently will likely replace more often based on acquired grime or stink, anyway.