If made right, and stored right....a century, or more
Kept dry, out of the sun, not subject to high temperatures, the shelf life of modern ammo is nearly indefinate.
Very old ammo, may not last as long as modern stuff, but it has already lasted a very long time. In the 1970s, I shot a quantity of .30-06 made in 1918. It all worked fine, even though the cases were a uniform dark brown!
I have a box of 1896 mfg 6.5x55mm Swede ammo that has suffered season cracking of some of the cases.
Military surplus ammo is the least reliable, especially that from foreign nations. One has no idea of how well it was made to start with, or what conditions it has been kept in, for decades or more. And wartime production ammo (particularly from nations who were defeated) tends to be some of the least reliable. But this is not a hard and fast rule. I recently had an experience with some surplus ammo (Israeli, I was told, headstamp TZ 80,81,82) that produced 17 misfires from 145 rnds, and 12 cracked cases (all TZ 80).
Balance this against all the old ammo I have shot that worked perfectly, and it is a very small matter. Even my handloads, some made in the early 80s are still fine.
Ammo will last longer than you will. Don't worry about it.