For sheer price id say the Glock. Ive been seeing a lot of used 22/23 for around 400 or so.
The SD40 is a good gun as well, although my experience is limited to handling one at a gun shop, but i know its gotten good reviews.
Those are the two Id choose for sure. Ive owned a couple .40 Glocks, a 23 and a 27, and honestly i loved them both. I never once had any malfunctions that were "user induced". I used the 23 as a "loaner" with friends on the range, and one evening we even managed to put down almost 800 rounds without stopping to clean or even lube the gun.