UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IClPkzPoLK8AxBxlVTm2xq3RDORFgi9uSDNGw6PLug0='
WHERE
key_id = '626629830691f7551b9d4d59764e683e2f73039538eed6b9540495bb469c7acb'
AND (
token = 'IClPkzPoLK8AxBxlVTm2xq3RDORFgi9uSDNGw6PLug0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)