UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1uWwJ8dbsFLDEfNvZ02PUL/Qr/xV5RrGVMnI1K7A0QQ='
WHERE
key_id = '3af3e31044060fb6b680cf0cc29f3a9ef3042d68c3ea9ad840b4dc4540710bff'
AND (
token = '1uWwJ8dbsFLDEfNvZ02PUL/Qr/xV5RrGVMnI1K7A0QQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)