UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hSfJrLgSv/KqLAEWcbrNYpbIAcc7I2E3ht+kDVjwyqQ='
WHERE
key_id = '2eeda9cf36aaaf6fc32921733b99e319f0bf750d7eb4f65a42fd1175d44cf686'
AND (
token = 'hSfJrLgSv/KqLAEWcbrNYpbIAcc7I2E3ht+kDVjwyqQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)