I didn't have experience myself as I never applied for OPT.
But I have a close friend who did that. She filed I-140 earlier and then applied for OPT. Later her OPT got approved followed by her I-140.
Also from the information that I know of, I-140 shouldn't affect your OPT. I checked school ISSS for that and it was confirmed there.