SELECT 
  categories.category_id, 
  categories.parent_id, 
  categories.id_path, 
  category_descriptions.category, 
  categories.position, 
  categories.status, 
  categories.company_id 
FROM 
  categories 
  LEFT JOIN category_descriptions ON categories.category_id = category_descriptions.category_id 
  AND category_descriptions.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.level <= 3 
  AND categories.deleted_at IS NULL 
  AND categories.company_id = 454 
ORDER BY 
  categories.is_trash asc, 
  categories.position asc, 
  category_descriptions.category asc

Query time 0.04008

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "1153.54"
    },
    "ordering_operation": {
      "using_temporary_table": true,
      "using_filesort": true,
      "nested_loop": [
        {
          "table": {
            "table_name": "categories",
            "access_type": "ref",
            "possible_keys": [
              "c_status",
              "index_categories_on_deleted_at"
            ],
            "key": "index_categories_on_deleted_at",
            "used_key_parts": [
              "deleted_at"
            ],
            "key_length": "6",
            "ref": [
              "const"
            ],
            "rows_examined_per_scan": 10182,
            "rows_produced_per_join": 33,
            "filtered": "0.33",
            "index_condition": "(`goimagine`.`categories`.`deleted_at` is null)",
            "cost_info": {
              "read_cost": "120.75",
              "eval_cost": "3.39",
              "prefix_cost": "1138.95",
              "data_read_per_join": "88K"
            },
            "used_columns": [
              "category_id",
              "parent_id",
              "id_path",
              "level",
              "company_id",
              "usergroup_ids",
              "status",
              "position",
              "is_trash",
              "deleted_at"
            ],
            "attached_condition": "((`goimagine`.`categories`.`company_id` = 454) 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`.`level` <= 3))"
          }
        },
        {
          "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": 33,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "11.20",
              "eval_cost": "3.39",
              "prefix_cost": "1153.54",
              "data_read_per_join": "154K"
            },
            "used_columns": [
              "category_id",
              "lang_code",
              "category"
            ]
          }
        }
      ]
    }
  }
}

Result

category_id parent_id id_path category position status company_id
2350 2349 2349/2350 Earrings 0 A 454
2332 2325 2325/2332 1" Magnets 1 A 454
2313 2312 2312/2313 Bracelets 1 A 454
8588 8587 8587/8588 Bracelets with Charm 1 A 454
2318 2316 2316/2318 Cameo 1 A 454
11388 11387 11387/11388 Christmas 1 A 454
2324 2323 2323/2324 Earrings 1 A 454
2335 2333 2325/2333/2335 Foil Magnets 1 A 454
2337 2336 2336/2337 Magnets 1 A 454
2343 2338 2336/2338/2343 Pendant Set, 1" 1 A 454
2340 2337 2336/2337/2340 Round Magnets, 1" 1 A 454
2333 2325 2325/2333 1.25" Magnets 2 A 454
2317 2316 2316/2317 Chainmaille 2 A 454
17076 11387 11387/17076 Halloween 2 A 454
2338 2336 2336/2338 Magnet Pendants 2 A 454
2326 2323 2323/2326 Necklaces 2 A 454
2314 2312 2312/2314 Necklaces and Chokers 2 A 454
2344 2338 2336/2338/2344 Pendant Set, 1.25" 2 A 454
2341 2337 2336/2337/2341 Round Magnets, 1.25" 2 A 454
8589 8587 8587/8589 Word Token Bracelets 2 A 454
2315 2312 2312/2315 Earrings 3 A 454
2348 2316 2316/2348 Heart Logo 3 A 454
2339 2336 2336/2339 Heart Logo Keychains 3 A 454
8696 2325 2325/8696 Rectangle Magnets 3 A 454
2342 2337 2336/2337/2342 Rectangle Magnets 3 A 454
2327 2323 2323/2327 Rings 3 A 454
11389 11387 11387/11389 Valentine's Day 3 A 454
11390 11387 11387/11390 Easter 4 A 454
2319 2312 2312/2319 Hand Jewelry 4 A 454
2328 2323 2323/2328 Jewelry Sets 4 A 454
2334 2325 2325/2334 Magnet Pendants 4 A 454
21627 0 21627 Amigurumi Animals 5 A 454
2320 2312 2312/2320 Jewelry Sets 5 A 454
2330 2323 2323/2330 Keychains 5 A 454
2321 2312 2312/2321 Charms 6 A 454
2322 2312 2312/2322 Keychains 7 A 454
2331 2312 2312/2331 Fidget Toy 8 A 454
2312 0 2312 Chainmaille Jewelry 10 A 454
2349 0 2349 Scalemaille Jewelry 20 A 454
2323 0 2323 Cameo Jewelry 30 A 454
3453 0 3453 Miscellaneous Jewelry 35 A 454
8587 0 8587 Macrame Bracelets 36 A 454
2316 0 2316 Keychains 40 A 454
2325 0 2325 Magnets 50 A 454
2642 0 2642 Crochet Items 60 A 454
2360 0 2360 Scrapbook Die Cuts 70 A 454
12711 0 12711 Dollhouse Miniatures 75 A 454
11387 0 11387 Holiday & Seasonal 80 A 454
2336 0 2336 Goimagine Street Team 90 A 454