UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/853Zdf9sVkQotjIUmaO0A/YcF0GFjC+JC/G9tyEFhM='
WHERE
key_id = 'be0cc66d356655bf18a8bc8d6c8d68ec9a6e88a636df5ea8b3bfed5c5cdbc5d7'
AND (
token = '/853Zdf9sVkQotjIUmaO0A/YcF0GFjC+JC/G9tyEFhM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)