They will last as long as they are not broken, and more than 15 years is common. Physical dropping can break it, as can water infiltration to the inside. Sometimes the power supply can burn out. An output jack can become unsoldered (easy fix). Key sensors can break. The mechanics of the keys can get worn down with use, like those of an acoustic piano. Much of this is theoretically fixable by a keen D.I.Y. musician-tech, but if the keyboard is older, out of production, and replaced with better sounding models at lower than repair prices, they are often not fixed; they are disposed of and replaced. :-( By contrast, and acoustic upright could last about 80 years as a fun to play instrument.