Other answers have addressed the key points here, provided the lens is kept free of mould and the mechanical parts are in good working order there's no reason a manual lens wont last for a very long time.
The comment about the Nikon 85mm f/1.8 being a lens you throw away after ten years was probably a reference to low end build quality and plastic construction. Modern "engineering" plastics are incredibly tough, but the cheaper plastics used on some products are nowhere near as durable as metal. If the lens is well cared for there's no reason to suggest the body wont last much longer than 10 years.
When it comes to modern autofocus lenses there is an additional concern, which is the failure of the electronic focus, aperture or image stabilisation systems. These will have a significantly shorter lifespan, I would be concerned about them still working after say 20 years (I know there will be counter examples, I'm talking on average).
Fixing electrical problems is not usually too difficult or expensive, provided you can get the parts. That is the kicker, as Canon for one like to discontinue the parts service for older lenses, particularly ones that have new more expensive replacements on the market...
Still with most lenses, even a complete breakdown of all motorized or electronic parts isn't necessarily the end of the road. A wide open only manual focus lens still has it's uses.
What I would be wary of is focus by wire lenses, i.e. those that don't have a direct mechanical coupling between the focus ring and lens groups. I almost bought a Canon 200 f/1.8L (a superb ultra wide aperture short telephoto, that was discontinued in 2004) but decided against it knowing if the autofocus broke, there would be no way to manually focus the lens. Such lenses are uncommon for DLSRs, but a lot of smaller systems, particularly mirrorless cameras have predominantly focus by wire lenses so I'd be concerned about making a significant investment in these.