Good question, even as helmet retailers we don't have a specific answer for this one. Legally speaking there is no expiry date on a motorcycle helmet - in theory there should be some major research done on this but the honest answer is there's too many varying factors which will affect this.
As a general rule of thumb we'd suggest 5 years from date of purchase / 7 years from date of manufacturer but this isn't a specific set in stone rule.
How you store your helmet, how often you wear it, how sweaty you are as a person, if you put your gloves inside your helmet, if you put your helmet on your mirrors, if you lend your helmet to other people, if you knock / drop your helmet - all of these are factors in how long a helmet will last...
More importantly how good the helmet is made will factor it's longevity. Cheap £50 helmets often look 10 years old after 1 year of use where as a decent helmet will often look brand new after 5 years.
The interior of your helmet is the most important factor, how well that's lasted. Certain Arai/Shoei models are painted black on the inside on the EPS liner so you can start to se signs of wear / cracks in the EPS where it's been worn over the years, that'll give you an OK indicator but not every manufacturer does this and even still there's no rule of "if you can see 10% white EPS showing you now need to change"
Everyone has a different level of safety too so some people change their helmet very regular where as other people don't for 20-30 years as we see sometimes. It's definitely a personal thing so if you're thinking about changing I guess the answer for your own conscience is soon but it's entiely a decision only you can make and no one can tell you when as it stands at the moment.
Hopefully this is a useful / also incredibly useless answer for you from someone that's been selling motorcycle helmets for 13 years of their life
