If gas prices are still at this level by July-August, I'd say it might affect the midterms. MIGHT, being the key word. I wouldn't say it will definitively hurt anything until we reach October with similar issues. But if oil prices are still fucked by October, we're going to be having a lot more problems that will also negatively affect things.
But people tend to forget things like this quickly. If Trump gets the Iran thing sorted out in the next month, it won't mean anything with the midterms. If he gets it sorted out and it's noticeably improves the overall geopolitical situation with Iran, it might actually positively affect the midterms. Won't be as good as if he had finished things nice an tidy by the end of April, but still not too bad. And if Cuba collapses before the midterms, that might be another feather in his cap.
But honestly, it's really not worth even speculating on the midterms until late September/early October. There's too much potential for things to happen, especially when it's Trump in the White House.