Testing has been carried out on expanded polystyrene foam used in bicycle helmets (which is same material used in motorcycle helmets) to determine if the impact attenuation properties change with age.
You can read here about the testing and the results which show the foam liner does not degrade with age. (not to be confused with the cloth liner)
For years shops have been telling riders that helmets need to be replaced every 5 years. I challenged a sales rep to show some empirical evidence to support this and his response was he would love to but the data was restricted. Bullshit. If it was true the manufacturers would have an expiry date on helmets and be pushing governments to pass laws on out of date use and have police inspect and fine people.
You are going to replace helmets over the course of time regardless if they get worn and parts cannot be replaced but you might also have a helmet that is low usage or that you replaced the liner and visor and it otherwise is in good condition. No need to think you have to stop using this. Additionally if you love a certain model helmet then there is nothing wrong with buying a couple and leaving one not used in cupboard or buying an old stock helmet, both of which I have read helmet sales staff say is unsafe.
All not true and means I need not worry about my favourite Nolan N43 Air which otherwise would have already been past retirement age.