UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FXDw6BuWxTpVVP5ZMh9T8dgMyg/QkSqsxLsEpCMqzE4='
WHERE
key_id = 'b2390298cc9c4fc9d2c1476dbfc5f3dc258f32d91e626d2b776c0c567fe78ac9'
AND (
token = 'FXDw6BuWxTpVVP5ZMh9T8dgMyg/QkSqsxLsEpCMqzE4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)