UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PsshKfIW6AAvAjfT73WcZFAPuV+zeYaxSdWRKBuWAiQ='
WHERE
key_id = 'f081819804893dfdc9754f57e7161ecef6655f8f72bf9fd8693334a7013adb11'
AND (
token = 'PsshKfIW6AAvAjfT73WcZFAPuV+zeYaxSdWRKBuWAiQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)