UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Oagb4QeSUY/ert/M0nTeMhEa9Zo4PYBKo7RSfM/e/Eg='
WHERE
key_id = '808c82eab5c8efdde425e72dc3f9de634742f691aaf08b469275e5ec05e8394e'
AND (
token = 'Oagb4QeSUY/ert/M0nTeMhEa9Zo4PYBKo7RSfM/e/Eg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)