I would say there in no such thing as too old to play well. If I have a hole on my roster and need a one or two season solution, I'm more than happy to go after a 31 year old since it lowers the risk of getting into a bidding war.

I've never really paid attention to age when selling players. If they've played well for me, I tend to let them stay until they retire.