WordPress plugin updates / set file as immutable to prevent certain files from changing?

Basically you should not include the file in the plugin in the first place. If the reason you don’t want it to be overwritten is because you modify it based on some local setting, then you should leave the immutable part of the file in it and create another file which will contain the mutable parts.

Then you can use your CSS like that (assuming you suplly constant.css with the plugin and generate costum.css locally.

add_action('wp_head','my_plugin_addcss');

function my_plugin_addcss() {

  // register and enqueue the immutable part
  wp_register_style('constantStyle', WP_PLUGIN_URL . '/my_plugin/constant.css');
  wp_enqueue_style('constantStyle');

  // register and enqueue the custom part
  wp_register_style('costumStyle', WP_PLUGIN_URL . '/my_plugin/costume.css');
  wp_enqueue_style('costumStyle');
}