Thank you for that tip! I got this to work:
selected_assets = unreal.EditorUtilityLibrary.get_selected_assets()
asset = selected_assets[0]
# After switching from deprecated EditorStaticMeshLibrary to StaticMeshEditorSubsystem,
# we have to get the default static mesh object first and get_lod_build_settings from it
default_staticmesh_object = unreal.StaticMeshEditorSubsystem.get_default_object()
lod_build_settings = default_staticmesh_object.get_lod_build_settings(asset, 0)
# make a change to one of its properties
lod_build_settings.set_editor_property('generate_lightmap_u_vs', False)
# now write the lod_build_settings back to the asset
default_staticmesh_object.set_lod_build_settings(asset, 0, lod_build_settings)