Within 5 years: never a problem
5-10 years: when stored properly, checked by a professional not a problem
>10 year: when stored properly, be carefull but can be used at own risk
You have to be sure what you're looking at when checking the dot code, some tyres have a lot of codes on the tyre looking like a week/year stamp!
Checking the first release date of that type of tyre can help
