UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9nbkMwme9rfrv+Hw1H3XTox7UCOS7RQ1DNcoraEdcSo='
WHERE
key_id = '6abd989bb3e178a67d9b522bccfc030f2c6c07bd94a5b9d9774ca88390c6029a'
AND (
token = '9nbkMwme9rfrv+Hw1H3XTox7UCOS7RQ1DNcoraEdcSo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)