I think keep doing your job with the utmost professionalism. Decide where your line in the sand is - what you can deflect withhumour/sarcasm/pithy remarks and what needs to be addressed 'properly.' And stick to it.
Keep up the slightly bored tone of pithy, dry replies
"Well the days of tank based warfare have passed I'm afraid Keith, I mean we saw that in the first gulf war didn't we? Look what happened there."
'yes Keith, I know you've expressed that opinion on my poor lady brain before, but I assure you I can strip down a laser microscope in ten minutes in between trivial thoughts of kittens...'
'How was progressive feminist thought back in the Jurassic, Keith.'
Etc
Any thing that crosses the line needs to be documented and called out immediately
"OK, look. I get I'm the only woman here and I put up with your frankly prehistoric views most of the time. However, when it comes to xxx that's a line crossed and it's not OK. "
"Oh yawn the strident feminist get out. A feminist is someone who believes in and works towards social, legal and financial equality for both sexes. Which bit of that is the issue? Do you believe women are your intellectual inferiors? "
For me, things like the tank comment (weird..) would be deflected but noted. Constant tank comments is crossing the line. Documentation can be key. Note down these incidents as they occur, with time and rough content.
It sounds extremely tiresome.