How do I increase the length of a text-field with saved values?
I got an answer from my friend as well. I would like to share his code here:

/**
 * Update field.
 */
function MODULE_update_8301() {
  $db = \Drupal::database();
  $field_name = 'field_MY_TEXT_FIELD';
  $table_prefixes = [
    'node',
    'node_revision'
  ];
  foreach ($table_prefixes as $table_prefix) {
    $db-&gt;schema()-&gt;changeField(
      "{$table_prefix}__{$field_name}",
      "{$field_name}_value",
      "{$field_name}_value",
      [
        'type' =&gt; 'varchar',
        'length' =&gt; 255,
        'default' =&gt; '',
      ]
    );
  }

  $config = \Drupal::configFactory()-&gt;getEditable('field.storage.node.' . $field_name);
  $settings = $config-&gt;get('settings');
  $settings['max_length'] = 255;
  $config-&gt;set('settings', $settings);
  $config-&gt;save();
}