Decades, possibly longer. There are some guns from way back, often called Pre-war (usually when referring to German guns prior to the 1940's) that are still shooting today. Some even earlier than that. Most of them had leather seals that will refresh with a good oiling if they are dried up. The early synthetic seals from the 70's were often prone to degrade, especially after years of inactivity. Modern synthetics are much better. Some early Sheridan and Benjamin multi-pumps built back in the 50's (and earlier) still shoot today. Same for many Crosmans. With proper care airguns can last literally a life time and be handed down.
Here is pic from Tom Gaylords blog of a deteriorated seal.
Nathan