UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'czz7ISnsSfLJnYnZZNfYqXcgdrwGkFh/g+VmmuURaKA='
WHERE
key_id = '1e9449849489d5f64a8e54c3dd57cf400e1ef9b5ad0075d6955af60918341e06'
AND (
token = 'czz7ISnsSfLJnYnZZNfYqXcgdrwGkFh/g+VmmuURaKA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)