constraints: Clean up logical operations

The logical version of the bitwise XOR operator ^ is !=. I don't
know why XOR was even used in the first place.