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.storefront_id IN (0, 1) 
  AND categories.deleted_at IS NULL 
  AND categories.category_id IN(
    3, 4, 12, 20, 21, 23, 45, 54, 59, 87, 5, 96, 
    99, 100, 109, 110, 112, 113, 114, 116, 
    117, 118, 123, 124, 319, 128, 179, 183, 
    184, 185, 187, 189, 191, 194, 46, 195, 
    198, 199, 202, 22751, 203, 206, 208, 
    209, 211, 47, 216, 260, 271, 273, 295, 
    55, 302, 567, 588, 795, 1375, 1396, 1399, 
    1400, 1552, 2586, 2587, 2884, 3440, 
    3665, 3666, 3876, 4473, 4476, 4477, 
    4478, 4479, 4480, 4481, 5144, 5145, 
    5146, 5147, 5148, 5149, 5150, 6634, 
    6639, 11179, 16417, 20810, 23123
  ) 
  AND categories.company_id = 1011 
ORDER BY 
  categories.is_trash asc, 
  categories.position asc, 
  category_descriptions.category asc

Query time 0.00540

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "39.76"
    },
    "ordering_operation": {
      "using_temporary_table": true,
      "using_filesort": true,
      "nested_loop": [
        {
          "table": {
            "table_name": "categories",
            "access_type": "range",
            "possible_keys": [
              "PRIMARY",
              "c_status",
              "p_category_id",
              "index_categories_on_deleted_at"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "category_id"
            ],
            "key_length": "3",
            "rows_examined_per_scan": 88,
            "rows_produced_per_join": 0,
            "filtered": "0.06",
            "cost_info": {
              "read_cost": "39.69",
              "eval_cost": "0.00",
              "prefix_cost": "39.69",
              "data_read_per_join": "133"
            },
            "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` = 1011) 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) and (`goimagine`.`categories`.`category_id` in (3,4,12,20,21,23,45,54,59,87,5,96,99,100,109,110,112,113,114,116,117,118,123,124,319,128,179,183,184,185,187,189,191,194,46,195,198,199,202,22751,203,206,208,209,211,47,216,260,271,273,295,55,302,567,588,795,1375,1396,1399,1400,1552,2586,2587,2884,3440,3665,3666,3876,4473,4476,4477,4478,4479,4480,4481,5144,5145,5146,5147,5148,5149,5150,6634,6639,11179,16417,20810,23123)))"
          }
        },
        {
          "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.02",
              "eval_cost": "0.00",
              "prefix_cost": "39.71",
              "data_read_per_join": "232"
            },
            "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.04",
              "eval_cost": "0.00",
              "prefix_cost": "39.76",
              "data_read_per_join": "86"
            },
            "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
5150 1400 1400/5150 Christmas Cards 0 A 1011 0 christmas-cards 1400
5144 1400 1400/5144 Decor 0 A 1011 0 decor 1400
4479 4473 4473/4479 Decor 0 A 1011 0 decor 4473
4476 1399 1399/4476 Decor 0 A 1011 0 decor 1399
2587 2586 2586/2587 Décor 0 A 1011 0 decor 2586
4481 4473 4473/4481 Drinkware 0 A 1011 0 drinkware-en-7 4473
5146 1400 1400/5146 Drinkware 0 A 1011 0 drinkware 1400
4478 1399 1399/4478 Drinkware 0 A 1011 0 mugs 1399
5147 1400 1400/5147 Gifts 0 A 1011 0 gifts-en-2 1400
4480 4473 4473/4480 Shirts 0 A 1011 0 shirts-en-4 4473
5145 1400 1400/5145 Shirts 0 A 1011 0 shirts 1400
4477 1399 1399/4477 Shirts 0 A 1011 0 shirts 1399
5148 1400 1400/5148 Stocking Stuffers 0 A 1011 0 stocking-stuffers 1400
2586 0 2586 Easter 1 A 1011 0 easter-en-5
1399 0 1399 Fall Finds 2 A 1011 0 fall-finds
1400 0 1400 Christmas 3 A 1011 0 christmas-decor-and-more
4473 0 4473 Halloween 4 A 1011 0 halloween-en-6
3876 0 3876 Gifts for Dad 5 A 1011 0 gifts-for-dad
3665 0 3665 Teacher Gifts 6 A 1011 0 teacher-gifts-en-2
2884 0 2884 Gifts for Mom 7 A 1011 0 gifts-for-mom
795 0 795 Soy Wax Melts 8 A 1011 0 soy-wax-melts
1552 0 1552 St. Patrick's Day 9 A 1011 0 st.-patricks-day-en-2
23123 0 23123 Graduation Gifts 10 A 1011 0 graduation-gifts-en-2
1396 0 1396 Body Pampering 11 A 1011 0 body-pampering
5149 0 5149 Kitchen Essentials 12 A 1011 0 kitchen-essentials
567 0 567 Southern Drinkware 13 A 1011 0 southern-drinkware
3666 0 3666 Patriotic July 4th Gear 15 A 1011 0 patriotic-july-4th-gear
20810 0 20810 Spring Décor and Gifts 16 A 1011 0 spring-decor-and-gifts
588 0 588 Mason Jar Soy Candles 17 A 1011 0 mason-jar-soy-candles
1375 0 1375 Valentine's Gifts and Décor 18 A 1011 0 valentines-gifts-and-decor
3440 0 3440 Southern Farmhouse Décor 19 A 1011 0 southern-farmhouse-decor