UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Px03NitFzz9bbSF9nNxA7Y1jW8I0xmeG2ayQyJ1cX7A='
WHERE
key_id = '9607954a16014d7cc4dfde3b2c17796087c4184d867c0b0d1c4e47008c956e29'
AND (
token = 'Px03NitFzz9bbSF9nNxA7Y1jW8I0xmeG2ayQyJ1cX7A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)