UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uEURdYt58AYgS8oGUy1VN10wJVQrld26Ugm4ams2gnM='
WHERE
key_id = '721127a8c4bbdce3c32fd9fdc55f4e92942cf90cd9d690ce6bfbd0064c12c60f'
AND (
token = 'uEURdYt58AYgS8oGUy1VN10wJVQrld26Ugm4ams2gnM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)