This question is more a salary cap issue than it is an issue of player's age.
The only players that are likely to decline significantly over the next couple years are Gore and Rogers. J. Smith is getting up there too.... but he is a DL. Strength sticks with older players better than speed. He will be a force till he decides to retire.
Salary cap is a bigger issue. The better we do, the more people will covet our players. Which means it will get more and more expensive to keep guys around. That is why the Goldson contract issue is such a big deal. We already have a ton of money locked up long term in the defense. Lets say in the next year or two Alex Smith and Michael Crabtree have pro-bowl kinds of seasons. All of the sudden, they get much more expensive and if all the money is tied up in the defense, then we loose play-makers on offense. Not to mention the OL... Staley is one of the lowest paid starting LT in the league. Yet he made the pro-bowl. His value will go up.
We have to be very careful about who we lock up long term, or else our window could close very quickly.