Short comments it depends on riding style and what tire.
In the eighties I ended upon Dunlops for a while i did not care that much I asked the shop and took what he had .
Some of them was so sticky and soft that they felt almost like glue on the surface I told a friend that if you throw this tire at the wall it will. stick and be hanging there . But they did not last .. and this without any racing style riding ( some of the tires probably was for a more sporty ride )
The touring bikes used Semperit in those days lasting much longer and had harder rubber For long autobahn riding. Lasted for ever but with poorer grip.
I never checked any date codes and never replaced any tire because of it being old.
I even had a front tire with cracked sides on for two MOT inspections being advised change it.
Not wanting to do it ..since there was still deep ..pattern .At least 10 years old .. But eventually changed it. Still with thread on them
Nowadays I change quicker ..not wanting to loose grip .. To little to save and to much to loose.
I have had 3 flat tires on bikes all of them on the back wheel.
2 of them not noticing before returning back to the parked bike one steel nail in a pretty much brand new back tire
One on a close to bald back wheel ..loosing air.
One was a bit more exiting I came rather fast into a large diameter Roundabout from a faster section of the highway ca 100 Km / h perhaps a bit under in the roundabout on a XS 650
When leaning the rear end started pumping sideways .. up down. Like starting to wobble.. I reduced throttle and raised the bike more upright. Slowing down
there was only a Little air left in the tire . I am thinking the centrifugal force kept it out on the highway and I did not notice it before the sideways loads came in . I continued on on the little air still in to a service service station not far away and got hold of
Something like that below and went home..
So to sum it up Normal riding style and extra care when wet. I don't believe one or a couple of years makes a big difference.
But if buying new it should be informed that it is not new if so.