Depending on the condition and how old it is, a used 16GB 3GS should easily fetch you 23-27k.
A small tip of advice, if you haven't bought Apple's Protection Plan already, buy it before the warranty runs out so that its a lot easier to sell a phone that's under warranty. You can't buy it after...