UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uA9EC9++ZGp11VOHVGBYbRuYkiGeDoWMuok7j5jUUfg='
WHERE
key_id = '7152dfa4b6eec05384c44c9509218dea18d1b5568947b64b30d38ee6f77b4f30'
AND (
token = 'uA9EC9++ZGp11VOHVGBYbRuYkiGeDoWMuok7j5jUUfg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)