Based on Alex' answer, I updated the code with non-deprecated code (entity_field.manager). Also fixed two small variable mistakes. This piece of code can be added to .install files for example and will update all entities containing the field you'd like to update.
$field_type = 'fieldtype_to_be_updated';
$new_property = 'new_property_to_be_added';
$manager = \Drupal::entityDefinitionUpdateManager();
$field_map = \Drupal::service('entity_field.manager')->getFieldMapByFieldType($field_type);
foreach ($field_map as $entity_type_id => $fields) {
foreach (array_keys($fields) as $field_name) {
$field_storage_definition = $manager->getFieldStorageDefinition($field_name, $entity_type_id);
$storage = \Drupal::entityTypeManager()->getStorage($entity_type_id);
if ($storage instanceof \Drupal\Core\Entity\Sql\SqlContentEntityStorage) {
$table_mapping = $storage->getTableMapping([
$field_name => $field_storage_definition,
]);
$table_names = $table_mapping->getDedicatedTableNames();
$columns = $table_mapping->getColumnNames($field_name);
foreach ($table_names as $table_name) {
$field_schema = $field_storage_definition->getSchema();
$schema = \Drupal::database()->schema();
$field_exists = $schema->fieldExists($table_name, $columns[$new_property]);
$table_exists = $schema->tableExists($table_name);
if (!$field_exists && $table_exists) {
$schema->addField($table_name, $columns[$new_property], $field_schema['columns'][$new_property]);
}
}
}
$manager->updateFieldStorageDefinition($field_storage_definition);
}
}