It really depend of the gear we are speaking about. Some recent gears could be failing in their third year of life. Electronic from serious builders like Accuphase/Restek/T+A/Putthenameofyourgoodbrand... are lasting around 20-30 years without problem, with exception of CD players, that will have, sometimes, unexpected age issues, generally on their moving parts. After 20-30 years, you should inspect them and make sure they are always working properly.
For speaker, generally, it's the same. Good speakers will last around 30 years, or more, without great problems. BUT... it depends from the builder and the material that is used, some are more difficult to maintain in the old days. For example, I know peoples that bough very old ATC speakers from Radio France. They simply reconed them, received new tweeters from ATC matching the old specs, some little recap and solding of the electronic and the fellow is ready for the next 30 years. But, some other technologies are not so "service friendly", foam suspended loudspeakers are reknowned to fail in their old age and the repair is difficult to impossible. Ferrofluid tweeters are prone to work less well in their old age and will be to change in shorter range of time, so make sure to go with a serious brand with serious service.