There are many opportunities on the market for used .40S&W pistols. One of the best is the Sig-Sauer "Red Box" pre-owned program, law enforcement trade-ins that have been run through the factory, all significantly worn parts replaced, refinished to new standards, shipped with manual and one-year factory warranty, usually for about 40% of MSRP for a new Sig.
About a year ago I acquired a Sig P229 "Red Box" pre-owned pistol in .40S&W, delivered for $390. MSRP at the time for a new one was $1087. Great pistol! DA-SA with decocker, known in the US military jargon as the M11, issued by several federal, state, and local law enforcement agencies, compact version of the excellent P226.
Other sources offer LE trade-ins by S&W, Sig, Glock, and others at very realistic prices. I like the Sig "Red Box" program because of the factory servicing and manufacturer's warranty included. Another plus with the Sig is easy conversion to .357 Sig if desired (requiring only a replacement barrel, same magazines and other parts work properly with either caliber), so for ~$150 or so you can have both calibers in one pistol that requires only field stripping to convert.