UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'AuqTAAMHI7hMCnrwJDiTraR+QRf1xX95ggMaYgPkrBQ='
WHERE
key_id = '26f28ff627212e6bc53636eec0865b72720877a14f035b4b670090ebb9d32aa6'
AND (
token = 'AuqTAAMHI7hMCnrwJDiTraR+QRf1xX95ggMaYgPkrBQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)