Update comment meta for all comments of specific post

Your approach will be very slow if there are N no of comments. Use following approach for much faster execution.

global $wpdb;
$sql="
    SELECT GROUP_CONCAT( comment_ID ) AS ids
    FROM  `wp_comments` 
    WHERE comment_post_ID =  ".$POST_ID;

    $ids = $wpdb->get_results($sql, ARRAY_A);

if(isset($ids[0]['ids']) && $ids[0]['ids'] != ''){
    $wpdb->query('
        UPDATE wp_commentmeta 
        SET meta_value = 0 
        WHERE comment_id IN ('.$ids[0]['ids'].') 
        AND meta_key = "accepted"
    ');
}

P.S : Haven’t tested the code.