If you have problems with a new lens you can return it or get it fixed for nothing, if you have a problem with a used lens you might well be on your own unless you've bought from a dealer and have a warranty.
The 17-40mm may well be a nice lens but IMVHO on APS-C (if that's what you're using) there are better f2.8 lenses, and of course the 17-40mm doesn't do two things that any 50mm f1.4 does, 50mm and f1.4.
If it makes it any easier to choose... I personally would only use a prime lens over a zoom for two reasons, fast aperture and macro, other than that I think that a nice zoom, f2.8 if possible, is the better and more flexible choice.
So maybe you should ask yourself "Why am I thinking about getting a 50mm f1.4?" and if the answer is because it'll go to f1.4 then it's the option to choose over the 17-40mm f4.