How to change a field value to 500 products (commerce module) at the same time?
Well I can come out of two ways of doing this. One of them is Using the commerce API which is really good you just have to get all your 500 products with the following method:

 $query=new EntityFieldQuery;

    $query= $query-&gt;entityCondition('entity_type','commerce_product')-&gt;execute();

    foreach($query as $entity){
       $entity-&gt;commerce_stock[LANGUAGE_NONE][0]['value'] = 1;
       commerce_product_save($new_product);
    }


Or you can also do it on the database updating the value of the table field_data_commerce_stock:

update field_data_commerce_stock set commerce_stock_value=ANY_NUMBER;