You should use update_field and pass all the selected values in an array
// save a checkbox or select value
$field_key = "field_1234567";
$value = array("red", "blue", "yellow");
update_field( $field_key, $value, $post_id );
https://www.advancedcustomfields.com/resources/update_field/