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(
    2566, 8, 6534, 42, 6767, 20877, 20880, 
    20881, 20883, 20884, 20886, 20887, 
    20888, 20889, 20894, 20895, 20896, 
    20899, 20900, 20902, 20903, 20904, 
    20906, 20907, 20910, 20911, 20915, 
    20916, 20917, 20918
  ) 
  AND categories.company_id = 9046 
ORDER BY 
  categories.is_trash asc, 
  categories.position asc, 
  category_descriptions.category asc

Query time 0.00210

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "13.61"
    },
    "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": 30,
            "rows_produced_per_join": 0,
            "filtered": "0.17",
            "cost_info": {
              "read_cost": "13.53",
              "eval_cost": "0.01",
              "prefix_cost": "13.54",
              "data_read_per_join": "134"
            },
            "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` = 9046) 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 (2566,8,6534,42,6767,20877,20880,20881,20883,20884,20886,20887,20888,20889,20894,20895,20896,20899,20900,20902,20903,20904,20906,20907,20910,20911,20915,20916,20917,20918)))"
          }
        },
        {
          "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.01",
              "prefix_cost": "13.56",
              "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.05",
              "eval_cost": "0.01",
              "prefix_cost": "13.61",
              "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
20877 0 20877 Animals 0 A 9046 0 animals-en-16
20886 0 20886 Camouflage 0 A 9046 0 camouflage-en-2
20887 0 20887 Carbon Fiber 0 A 9046 0 carbon-fiber
20888 0 20888 Cartoons 0 A 9046 0 cartoons
20889 0 20889 Constitutional 0 A 9046 0 constitutional
20880 20877 20877/20880 Crustaceans 0 A 9046 0 crustaceans 20877
20896 0 20896 Fabrics 0 A 9046 0 fabrics
20881 20877 20877/20881 Fish 0 A 9046 0 fish 20877
20899 0 20899 Food and Drink 0 A 9046 0 food-and-drink
20900 0 20900 Games 0 A 9046 0 games-en-11
20902 0 20902 Heros 0 A 9046 0 heros
20903 0 20903 Holidays 0 A 9046 0 holidays-en-37
20904 0 20904 Leather 0 A 9046 0 leather-en-4
20883 20877 20877/20883 Mammals 0 A 9046 0 mammals 20877
20906 0 20906 Metal 0 A 9046 0 metal-en
20907 0 20907 Mineral 0 A 9046 0 mineral
20895 0 20895 Miscellaneous 0 A 9046 0 miscellaneous-en-8
20910 0 20910 Mythical 0 A 9046 0 mythical
20894 0 20894 Paintings 0 A 9046 0 paintings-en-12
20911 0 20911 Public Service 0 A 9046 0 public-service
20884 20877 20877/20884 Reptiles 0 A 9046 0 reptiles 20877
20915 0 20915 Skulls 0 A 9046 0 skulls-en-3
20916 0 20916 Sports 0 A 9046 0 sports-en-12
20917 0 20917 Tartan 0 A 9046 0 tartan
20918 0 20918 Textures 0 A 9046 0 textures