Generally, 10-20 years is best for buying replacements. Every month, the maintenance cost of a plane slightly increases, so when a plane hits 40 generally, it is no longer profitable. I do know certain aircraft like the Bristol Brittania, Canadair Cl-44 and Tupolev Tu-114 can virtually go on forever if you want them to, but the 707, 757 and any other replacement (Il-62 for Eastern Bloc) are more profitable over time.
Thanks!