I don't think the .40 or the .45 has a lock on quick stops, so if you can place the bullet well, either should do the job. You'll get a bit larger bullet with the .45, of course, and that's important to some folks; on the other hand, you'll get a few more shots in the mag (maybe more that a few more) with the .40, and I've never heard of anyone complaining after a gunfight that they wished they had LESS ammo. The .40 recoil is bit more snappy that a .45 in similar-sized/weighted guns, but there are very few directly comparable .40 and .45 weapons, as they normally are built on different frames, so the usually smaller and lighter .40 guns win this round, too.
If you plan on ever carrying it concealed, then onalandline's suggestion of the G23 (above) is a good choice. For open carry or range use, or if your hands are fairly large, the full-size G22 may be a better pick. The new Gen4 Glocks in .40 are working just fine, and the dual-spring recoil assembly does reduce a little bit of the bounce over the older Gen3 single-spring guns. I bought a Gen4 full-size .40 not too long ago, and right now it's shooting better than one of my match-ready Glock 34 9mm long-slides, which is kind of annoying. Be prepared for a slightly boxy feel to the Glock grip; if you shoot it regularly, your hand and mind will adapt and you'll never think about it after the first month or so.
"Placement is power" -- seen in an article by Stephen A. Camp
(RIP, Mr. Camp; you will be remembered, and missed)