That looks correct to me. The '~' in front of the expression is a Boolean 'NOT' operator, which flips all the bits.
So, for example, let's say we're talking about pinNumber=3 for state=HIGH:
(1 << 3) Will result in 0b00001000
~(0b00001000) Will result in 0b11110111
expanderStatus &= 0b11110111 Will set pinNumber 3 LOW, which turns into a HIGH signal due to the negative logic of the signal.