UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SrPWxe9DldcNM5cEH+VxTLfLJikNvZJ6TeCMmzmkbPs='
WHERE
key_id = '34d2605302906248a3142847063a93c23ca6b635da31267189a649e5146c910f'
AND (
token = 'SrPWxe9DldcNM5cEH+VxTLfLJikNvZJ6TeCMmzmkbPs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)