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
I have a Pentax K 10 and K100 and K 5 and they get occasional use. Still, 6MP is not so much and a 'bit' more is good. I have the Phase One P20 as a point and shoot snapshooter but probably the P25 would be more future proof. Can't make up which camera would be the 'one' but Mamiya RZ with 110 lens would be a lot easier to carry than a Fuji GX680 but the Fuji gives all movements. Tough decision