The problem is that many older cameras, once you add shipping and possible import duty, cost almost as much as much newer cameras. A used K-5, K-5II is much newer technology than something like K-10D (despite the fact that the camera was great when it came to the market and can still work as well today as it did back then). K-50 or K-S1 is what I would recommend, and you can get these for low prices, even new. Buying new has the added benefit of having warranty. It just doesn't make much sense going to buy a *istD and having it shipped, as its shutter has been used, the materials get tired, and its technology is simply not on the same level as new stuff. Digital cameras evolve very quickly, each generation has some improvements.
So look into K-50 and K-S1 (maybe even K-30, it is almost same as K-50, just different design and slightly older, but same technology as far as I know); or if you want steeper learning curve and higher tier camera: K-5 and K-5II (II is newer, has better AF module; IIs is better yet, but might be expensive). There are some differences between these cameras, you can check here:
Pentax K-S1 vs. Pentax K-50 vs. Pentax K-5 - Pentax Camera Comparison - PentaxForums.com
If you want to get something cheaper still, K-7 (predecessor of K-5), K-r and K-x (predecessors of K-50) are as old as I would go. I doubt you would save much money looking for these, but check local listings. The thing with used market is that it really depends on your location, how much shipping you are willing to pay, and who just happens to be selling what. Sometimes you can get a steal, other times you can't find anything reasonable for months. I think keh.com and the marketplace on these forums might be good places to look for used gear.
One other thing to keep in mind is lenses! This is a DSLR camera, its main value is that you can switch lenses. So make sure you leave some budget for lenses. A lens will keep value much longer than a DSLR, and can be used on even much newer technology. Today many Pentaxians use very old lenses, because they are still optically good or at least adequate (depends on lens, of course). Older lenses with m42 mount need a simple adapter and they can be used; of course, if the lens was made before AF was invented, the lens will not have AF. But it might allow a function called Catch in focus, which triggers shutter when focus is achieved, even with old, pre-AF lenses.