Adding logic to existing 240 V AC circuit
simulate this circuit &ndash; Schematic created using CircuitLab
Figure 1. Mains XOR using relays.
It seems unnecessarily complicated to change voltage levels. An XOR can be created using two relays. Mains powered relays can be obtained in small form-factor. Look for &quot;ice-cube&quot; relays, for example.

Figure 2. A selection of ice-cube relays.
Double-check the contacts are rated to suit your requirements.