you'd wanna sell them at about 31~32, before their skills start to decline as well as their value.
This is the answer you will get from most people but I disagree with it. I got to D2 in 3 seasons and a key part of my strategy was buying lots of ~31yo players that were under priced.
I don't think there is any good answer to this question. Sometimes you should be selling a player in their 20s and sometimes you should ride out their decline. Like most things in life, it depends.