Bitrix\Main\Loader::includeModule('sale');
Bitrix\Main\Loader::includeModule('iblock');
Bitrix\Main\Loader::includeModule('catalog');
$ORDER_ID = 23;
$db_order = CSaleOrder::GetList(
	array("DATE_UPDATE" => "DESC"),
	array("ID" => $ORDER_ID),
	false,
	false,
	array('ID', 'PERSON_TYPE_ID')
);
if ($arOrder = $db_order->Fetch())
{
   $db_props = CSaleOrderProps::GetList(
        array("SORT" => "ASC"),
        array(
			"PERSON_TYPE_ID" => $arOrder["PERSON_TYPE_ID"], // тип плательщика
			"CODE"			=>	"PAY_SUMM" // код свойства который надо изменить
		)
    );
   while ($arProps = $db_props->Fetch())
   {
		$db_vals = CSaleOrderPropsValue::GetList(
            array("SORT" => "ASC"),
            array(
                    "ORDER_ID" => $ORDER_ID,
                    "ORDER_PROPS_ID" => $arProps["ID"]
                )
        );
		while ($arVals = $db_vals->Fetch()){
			if(!$arVals['VALUE'])
				CSaleOrderPropsValue::Update($arVals['ID'], array("ORDER_ID"=>$arVals['ORDER_ID'], "VALUE"=>"140")); 
		}
   }
}