There is no downside to leaving the table. I have two axes, based on the reaction of the douchebags and of the others at the table. There are no neutral parties.
1) Douchebags may think you're a 'fag' - You win, they are still douchebags and you are not around douchebags.
2) Douchebags may get embarrassed - You win, they may think before douching again and you are not around douchebags.
3) Douchebags may apologize (assume sincerely), ceasing to be douchebags - You win, the table can return to normal conversation, and you are not around douchebags.
A) Others stay at the table, giving you no support - You win, you have upheld the virtue of equality, you have taken the measure of people you thought were not douchebags, and you are not around douchebags.
B) Others stay at the table, telling douchebags that they were over the line - You win, you have encouraged dissent, and you are not around douchebags.
C) Others leave the table or restaurant - You win, you have led others to take an affirmative stand against the douchebags, and you are not around douchebags.
D) Others follow you to a different table or restaurant - You win, you have led others to take an affirmative stand against the douchebags, you can have a conversation without shouting (unless it's because Tottenham are CRUSHING Chelsea, Liverpool, Man U, or Arsenal) and you are not around douchebags.
The important thing is making your stand there and then. It takes chutzpah, but the more you work it, the stronger it gets.