SELECT 
  categories.category_id, 
  categories.parent_id, 
  categories.id_path, 
  category_descriptions.category, 
  categories.position, 
  categories.status, 
  categories.company_id, 
  categories.storefront_id, 
  seo_names.name as seo_name, 
  seo_names.path as seo_path, 
  category_descriptions.mega_m_category_banner_url, 
  category_descriptions.mega_m_category_svg_icon 
FROM 
  categories 
  LEFT JOIN category_descriptions ON categories.category_id = category_descriptions.category_id 
  AND category_descriptions.lang_code = 'en' 
  LEFT JOIN seo_names ON seo_names.object_id = categories.category_id 
  AND seo_names.type = 'c' 
  AND seo_names.dispatch = '' 
  AND seo_names.lang_code = 'en' 
WHERE 
  1 = 1 
  AND (
    categories.usergroup_ids = '' 
    OR FIND_IN_SET(0, categories.usergroup_ids) 
    OR FIND_IN_SET(1, categories.usergroup_ids)
  ) 
  AND categories.status IN ('A') 
  AND categories.id_path LIKE '12/%' 
  AND categories.storefront_id IN (0, 1) 
  AND categories.deleted_at IS NULL 
  AND categories.company_id = 0 
ORDER BY 
  categories.is_trash asc, 
  categories.position asc, 
  category_descriptions.category asc

Query time 0.00176

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "40.89"
    },
    "ordering_operation": {
      "using_temporary_table": true,
      "using_filesort": true,
      "nested_loop": [
        {
          "table": {
            "table_name": "categories",
            "access_type": "range",
            "possible_keys": [
              "c_status",
              "id_path",
              "index_categories_on_deleted_at"
            ],
            "key": "id_path",
            "used_key_parts": [
              "id_path"
            ],
            "key_length": "767",
            "rows_examined_per_scan": 90,
            "rows_produced_per_join": 0,
            "filtered": "0.10",
            "index_condition": "(`goimagine`.`categories`.`id_path` like '12/%')",
            "cost_info": {
              "read_cost": "40.75",
              "eval_cost": "0.01",
              "prefix_cost": "40.76",
              "data_read_per_join": "241"
            },
            "used_columns": [
              "category_id",
              "parent_id",
              "id_path",
              "company_id",
              "usergroup_ids",
              "status",
              "position",
              "is_trash",
              "deleted_at",
              "storefront_id"
            ],
            "attached_condition": "((`goimagine`.`categories`.`company_id` = 0) and ((`goimagine`.`categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`goimagine`.`categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`goimagine`.`categories`.`usergroup_ids`))) and (`goimagine`.`categories`.`status` = 'A') and (`goimagine`.`categories`.`storefront_id` in (0,1)) and (`goimagine`.`categories`.`deleted_at` is null))"
          }
        },
        {
          "table": {
            "table_name": "category_descriptions",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "category_id",
              "lang_code"
            ],
            "key_length": "9",
            "ref": [
              "goimagine.categories.category_id",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 0,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.03",
              "eval_cost": "0.01",
              "prefix_cost": "40.80",
              "data_read_per_join": "418"
            },
            "used_columns": [
              "category_id",
              "lang_code",
              "category",
              "mega_m_category_banner_url",
              "mega_m_category_svg_icon"
            ]
          }
        },
        {
          "table": {
            "table_name": "seo_names",
            "access_type": "ref",
            "possible_keys": [
              "PRIMARY",
              "dispatch"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "object_id",
              "type",
              "dispatch",
              "lang_code"
            ],
            "key_length": "206",
            "ref": [
              "goimagine.categories.category_id",
              "const",
              "const",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 0,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.08",
              "eval_cost": "0.01",
              "prefix_cost": "40.89",
              "data_read_per_join": "156"
            },
            "used_columns": [
              "name",
              "object_id",
              "company_id",
              "type",
              "dispatch",
              "path",
              "lang_code"
            ]
          }
        }
      ]
    }
  }
}

Result

category_id parent_id id_path category position status company_id storefront_id seo_name seo_path mega_m_category_banner_url mega_m_category_svg_icon
291 58 12/58/291 Aromatherapy 10 A 0 0 aromatherapy 12/58
311 59 12/59/311 Bath Accessories & Caddies 10 A 0 0 bath-accessories-and-caddies 12/59
301 55 12/55/301 Eyes 10 A 0 0 eyes 12/55
286 57 12/57/286 Facial Care 10 A 0 0 facial-care 12/57
280 53 12/53/280 Shampoos 10 A 0 0 shampoos 12/53
320 319 12/319/320 Shaving & Grooming 10 A 0 0 shaving-and-grooming 12/319
295 54 12/54/295 Soaps 10 A 0 0 soaps 12/54
54 12 12/54 Soaps & Washes 10 A 0 0 soaps-and-washes 12
296 54 12/54/296 Body Wash 20 A 0 0 body-wash 12/54
281 53 12/53/281 Conditioners & Treatments 20 A 0 0 conditioners-and-treatments 12/53
308 56 12/56/308 Diapers & Changing Pads 20 A 0 0 diaper-and-changing-pads 12/56
321 319 12/319/321 Hand Sanitizers 20 A 0 0 hand-sanitizers 12/319
292 58 12/58/292 Heat & Cold Packs 20 A 0 0 heat-and-cold-packs 12/58
302 55 12/55/302 Lips 20 A 0 0 lips 12/55
287 57 12/57/287 Moisturizers 20 A 0 0 moisturizers 12/57
57 12 12/57 Skin Care 20 A 0 0 skin-care 12
288 57 12/57/288 Balms & Salves 30 A 0 0 balms-and-salves 12/57
297 54 12/54/297 Bath Bombs 30 A 0 0 bath-bombs 12/54
282 53 12/53/282 Brushes & Combs 30 A 0 0 brushes-and-combs 12/53
322 319 12/319/322 Deodorant 30 A 0 0 deodorant 12/319
303 55 12/55/303 Face 30 A 0 0 skin 12/55
293 58 12/58/293 Massage 30 A 0 0 massage 12/58
313 59 12/59/313 Washcloths & Towels 30 A 0 0 washcloths-and-towels 12/59
309 56 12/56/309 Wet Bags 30 A 0 0 wet-bags 12/56
310 56 12/56/310 Baby Shampoo & Bath 40 A 0 0 baby-shampoo 12/56
298 54 12/54/298 Bath Salts & Scrubs 40 A 0 0 bath-salts-and-scrubs 12/54
323 319 12/319/323 Bug Repellent 40 A 0 0 bug-repellent 12/319
294 58 12/58/294 Essential Oils 40 A 0 0 essential-oils 12/58
289 57 12/57/289 Exfoliation 40 A 0 0 exfoliation 12/57
304 55 12/55/304 Nails & Nail Care 40 A 0 0 nails 12/55
58 12 12/58 Spa & Relaxation 40 A 0 0 spa-and-relaxation 12
299 54 12/54/299 Bath Oils 50 A 0 0 bath-oils 12/54
55 12 12/55 Cosmetics 50 A 0 0 cosmetics 12
53 12 12/53 Hair Care 50 A 0 0 hair-care 12
305 55 12/55/305 Makeup Tools & Brushes 50 A 0 0 makeup-tools-and-brushes 12/55
324 319 12/319/324 Oral Care 50 A 0 0 oral-care 12/319
56 12 12/56 Baby & Child Care 60 A 0 0 baby-and-child-care 12
300 54 12/54/300 Bubble Bath & Soaks 60 A 0 0 bubble-bath-and-soaks 12/54
306 55 12/55/306 Cosmetic Bags 60 A 0 0 cosmetic-bags 12/55
316 59 12/59/316 Scrubbers & Wipes 60 A 0 0 scrubbers-and-wipes 12/59
59 12 12/59 Bath Accessories 70 A 0 0 bath-accessories 12
317 59 12/59/317 Soap Dishes & Dispensers 70 A 0 0 soap-dishes-and-dispensers 12/59
318 59 12/59/318 Bathroom Storage & Organizers 80 A 0 0 bathroom-storage-and-organizers 12/59
77 12 12/77 Fragrances 80 A 0 0 fragrances 12
128 319 12/319/128 Face Masks 90 A 0 0 face-masks-en-7 12/319
319 12 12/319 Personal Care 90 A 0 0 personal-care 12