This simply has to be the case if the "20 years old" line in TSFS is to make any sense.
The script originally said "40 years" (as did the script synopsis in the "Starlog" movie mag for ST II).
If we assume the ship also had a massive overhaul somewhere between Pike's command and "Where No Man Has Gone Before" (or "The Corbomite Maneuver"), then 20 years before ST III still works.