Wordpress custom post updating custom field

I have over 1000 custom posts of type lp_lesson and I am trying to edit a custom field in every single lesson based on some conditions. Currently I am just trying to get it work. I've tried to replace wpk_icon_text (which is the name of the custom field) with name, title, post_title, post_content, post_title and nothing seems to change in any lesson. Is this not possible? I would rather it loop through every post instead of me having to manually edit each custom field. (I am using a plugin that created the custom field).

This is in my functions.php

add_action( 'wp_enqueue_scripts', 'win_9388244_format_lp_lesson' );

function win_9388244_format_lp_lesson() {
  //Get post type of lp_lesson
        $args = array(
         'post_type' => 'lp_lesson'
        );
        $posts = get_posts($args);
  foreach($posts as $post) {
    update_post_meta( $post->ID, 'wpk_icon_text', 'Testing' ); 
  }
}