You can just about walk between the TWA and T7. though there is a "no pedestrians" sign between the bus area and T7, which seems largely ignored. But the Airtrain even off peak is every 10 minutes. Sometimes they close late at night for maintenance work but I doubt you need to worry about that.
You could go all the way to Jamaica (though that sector is chargeable) since in the area of Jamaica station there are a lot of food options. That said, every Brooklyn friend I know things it's incredibly unsafe in that (Queens) area, not that I've seen anything too unsavoury around there. You can get to the lower sections of Manhattan in about 40 minutes via Howard Beach so if you were on time you could just about sneak out there, but probably in your shoes I would go to the TWA if they were open for catering.
As a general point, during the pandemic I've come to find travelling with a packed lunch of my own making quite a useful thing to do.