UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'l8zVR4rEkXyp8eQpW4i1qGIke8ANRUaN72FC+rIshUY='
WHERE
key_id = '925b99b276e17bfffe83375df4166dd4038ebc10c486b2b22220a99a799631b9'
AND (
token = 'l8zVR4rEkXyp8eQpW4i1qGIke8ANRUaN72FC+rIshUY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)