UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uHELjvMn6y5qT/JluSyd+4IxCvltItl4SeuqkLSPJVc='
WHERE
key_id = '84cd261b494a2ab60cff27aa1b70696e80bcafb4cd240e65d4095b05a147d8b9'
AND (
token = 'uHELjvMn6y5qT/JluSyd+4IxCvltItl4SeuqkLSPJVc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)