UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'H1IhNWbftfjXxGD+mOgOsKg7L1bajhkxqP6F8Z7g/hQ='
WHERE
key_id = '709380890de709745389b8ec823c08cc010c372c82fbfaf6cfb37e5b0026610e'
AND (
token = 'H1IhNWbftfjXxGD+mOgOsKg7L1bajhkxqP6F8Z7g/hQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)