Do helmets really lose their quality with time even if kept in package? A friend of mine, who works as a sales manager in a good bike shop advised me to never buy a helmet that is older than couple of years, and the best thing to do is to buy the current model line, when they arrive to LBS (like fresh bread). Neither he earns from my purchases at his shop, nor he insisted to buy there, and even recommended me a few models that they don't have, so there is no marketing bias in this advise. So the question is, whether a helmet really looses its quality even if it's stored in a bike shop?
A lot will depend on the construction of the helmet. For example the basic material in the helmet will be some sort of sponge or foam which relies on its texture to absorb sudden impacts; does this degrade over time? For example, a loaf of bread gets its texture from the tiny air bubbles formed while rising and proving, but if left to prove too long, the structure collapses, or, once baked, the bread will harden and not be as flexible. 

So it might be with helmet foam; at least, that's the concern, in particular when subjected to sustained UV/sun light. It's certainly not been a concern that manufacturers have been quick to dispel. 

But there is another side to this question, not just whether you should not buy an older helmet because it has lost its ability to do its job? Have the helmet construction methods moved on since that helmet was made, simply, are newer helmets better? Are they lighter, stronger, more absorbent, better value, more adjustable? 

Many reputable organisations, e.g. the Bicycle Helmet Safety Institute, say not to worry


  Most manufacturers now recommend that helmets be replaced after five years, but some of that may be just marketing. (Bell now recommends every three years, which seems to us too short. They base it partially on updating your helmet technology, but they have not been improving their helmets that much over three year periods, and we consider some of their helmets since the late 1990's to be a step backwards, so we would take that with a grain of salt.) Deterioration depends on usage, care, and abuse. But if you ride thousands of miles every year, five years may be a realistic estimate of helmet life. And helmets have actually been improving enough over time to make it a reasonable bet that you can find a better one than you did five years ago. It may fit better, look better, and in some cases may even be more protective.


The Snell foundation concurs: 


  Hair oils, body fluids and cosmetics, as well as normal "wear and tear" all contribute to helmet degradation.


Although I would hesitate to buy a helmet which can't stand up to sweat, this suggests that it is use that affects the longevity of the item, not its storage. 

I'm not a scientist in this area, but while there might be evolutionary reasons in the helmet's construction to merit buying newer ones, just being stored for a few years probably won't be reason enough. 

But as I asked in an answer to a related question, why are you planning on wearing it? If you're looking for a cheap helmet because you don't really want to wear it, then an old one will be fine, but if you're genuinely concerned for your safety and you really want something to do the best job, then should you be quibbling over the few dollars/pounds/{currency units} difference?