I have a lot of opamps/comparators. Which standard one would you recommend for this kind of application?
The LM393 is the "generic comparator" equivalent to the LM358 "generic opamp".
But the more I consider it, I see some advantages to using the 358. The 393 has an open-collector output so you would need a pull-up resistor at the output (which would supply the transistor base current). The comparator output would then shut *off* the transistor, so you would have to rearrange your hysteresis and logic levels.
But the 358 and the 393 have identical input stages, so that's not a problem. The 393 is faster as a comparator, but that's not going to matter in your case. The 358 class AB output (drives both high and low) might be an advantage in your design.
One caveat: the 358/393 inputs aren't designed to work all the way up to the positive supply rail (look at the specs). You might want to have your sensor pull-up resistor connect to +3V (you can use a resistor divider on the +5 rail), or use a true "rail to rail" part.
And it might be time to back up a bit and reconsider the entire circuit. Why is the transistor there in the first place? You can drive the LVC inverters directly from the 358 output (or from the 393 comparator, with a pull-up resistor). You can take the positive feedback (hysteresis) from the second inverter. Of course you could replace everything following the comparator with a $1 8-pin PIC-style ucontroller. Actually, you could even pull the comparator function into the PIC using the internal ADC. But I assume you don't want to go that route
I've got to run now, but if nobody has shown you a good input protection circuit I will draw one up tonight or tomorrow.