UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IgH/6rDYxZ6TQV3nDZqsDg6gw7pSE37ZJ5Ou8JPmmHE='
WHERE
key_id = 'e4e6f9159b86f36ce72c0daf6105c8af90e4d4b1ada93a697c21042448d5c5a9'
AND (
token = 'IgH/6rDYxZ6TQV3nDZqsDg6gw7pSE37ZJ5Ou8JPmmHE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)