Take the new sensor, and find the Allen wrench that fits snugly in the square part, where you need to depress the little plastic lever to get the thing to unlock the wiring connector. To get the connector apart, stick that hex wrench as far as it will go into the wiring connector. It will stay in there by friction and unlock the locking lever.
Some English Allen wrench fits perfectly. Once you push it in there, it will stay in there all by itself, keeping the tiny lever unlocked. Then you can grab the bottom of the connector with a pair of extra long needle nose pliers and disconnect it easily. If it doesn't come out with a slight pull, it isn't unlocked. Z