I still make photos with my Olympus E-1, which was new in 2003 and I acquired in 2007. It still makes superb photographs.
So it's a matter of perspective: How long is a particular camera viable for your use? "Old" film cameras go out of use through needing too much (expensive) service, or for lack of film, or for being more work to deal with than you can put into film processing and rendering. Old digital cameras go out of use usually because you might want the advantages/improved performance/etc of a newer model; few that are not mistreated ever actually break or wear out.
If you're happy with the results you get from any camera, with a little care in handling nearly all of them can last forever ... Unless you're doing something with them that implies extensive wear to the limits of their mechanical parts.
G