UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0it+RNsNLcdl48yXGNVuhJFgCt6OZlo3oTtyW3ruebc='
WHERE
key_id = '06bb75de8f115cafb0bb2bfc71ba45553e9b78efaf157b23d0d4bb35a3787f66'
AND (
token = '0it+RNsNLcdl48yXGNVuhJFgCt6OZlo3oTtyW3ruebc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)