Line a plate with paper towels and place it near the stove. In a deep pot set over medium-high heat, add enough oil to reach a depth of about 2 inches (5 cm). Heat the oil until it reaches 350°F (180°C) on a deep-fry thermometer. [Editor’s Note: If you don’t have a thermometer, use the bread test: Once the oil is shimmering, drop in a cube of day-old bread and if it browns in no less than 30 seconds, the oil is ready. If it burns in that time, turn the heat down.]
Make sure your beans are completely dry and your oil is hot before preparing the batter. In a medium bowl, lightly whisk together the flour, salt, and 2/3 cup soda water. It’s fine if some lumps of flour remain. If necessary, add more water, a little at a time, until the batter reaches the consistency of heavy cream.
Working with 3 to 4 beans at a time, dunk them in the batter, ensuring they’re well coated, then carefully lower them into the hot oil. Cook until the batter is pale gold and crunchy, 30 to 90 seconds. Use a slotted spoon to lift out the beans and drain them on the lined plate. Repeat with the rest of the beans, being sure not to crowd the pot.
In a small bowl, stir the crushed garlic with the mayonnaise, if using.
Serve the deep-fried green beans with the garlic mayonnaise or, if desired, with tartar sauce, as is often done in Lisbon.