$existProduct = \Bitrix\Catalog\Model\Product::getCacheItem($arFields['ID'],true);
if(!empty($existProduct)){
\Bitrix\Catalog\Model\Product::update(intval($PRODUCT_ID),array("ID" => $PRODUCT_ID, array('WEIGHT' => (int)$data[5])));
} else {
\Bitrix\Catalog\Model\Product::add(array("ID" => $PRODUCT_ID, 'WEIGHT' => (int)$data[5]));
}