Update user_login, user_nicename, and display_name

You don’t need SQL, and shouldn’t use it when Core functions will do the job. Part of the reason why is the complexity of the tables (and the fact they might change).

  1. Query your users,
  2. loop through pulling metadata,
  3. and update

Proof of concept:

$u = new WP_User_Query( 
  array( 
    'role' => 'customer' 
  ) 
);
foreach ($u->results as $user) {
  $fn = get_user_meta($user->ID,'first_name',true);
  $ln = get_user_meta($user->ID,'last_name',true);
  $user->data->user_login = strtolower("$fn,$ln");
  $user->data->user_nicename = strtolower("$fn-$ln");
  $user->data->display_name = "$fn $ln";
  wp_update_user($user);
}

You really should create some logic to check that $fn and $ln are not empty and compensate if one or both are.

600 users should update very quickly