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, 22, 8, 6534, 61, 109, 117, 118, 20, 329, 
    342, 349, 357, 2021, 2022, 2023, 2024, 
    2025, 2026, 2027, 2033, 2034, 2035, 
    2036, 2037, 2038, 2039, 2566, 3514, 
    11430, 11431, 11432, 11433, 11435, 
    11436, 11437, 11438, 11439, 11440, 
    11441, 11442, 11654, 11655, 11656, 
    11657
  ) 
  AND categories.company_id = 1522 
ORDER BY 
  categories.is_trash asc, 
  categories.position asc, 
  category_descriptions.category asc

Query time 0.00443

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "20.37"
    },
    "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": 45,
            "rows_produced_per_join": 0,
            "filtered": "0.11",
            "cost_info": {
              "read_cost": "20.30",
              "eval_cost": "0.01",
              "prefix_cost": "20.30",
              "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` = 1522) 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,22,8,6534,61,109,117,118,20,329,342,349,357,2021,2022,2023,2024,2025,2026,2027,2033,2034,2035,2036,2037,2038,2039,2566,3514,11430,11431,11432,11433,11435,11436,11437,11438,11439,11440,11441,11442,11654,11655,11656,11657)))"
          }
        },
        {
          "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": "20.32",
              "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.01",
              "prefix_cost": "20.37",
              "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
11431 2021 2021/11431 Animal 0 A 1522 0 animal 2021
11441 2021 2021/11441 Awareness 0 A 1522 0 awareness 2021
11654 2021 2021/11654 Birthday 0 A 1522 0 birthday 2021
2027 2022 2022/2027 Birthday 0 A 1522 0 birthday 2022
2023 2022 2022/2023 Christmas 0 A 1522 0 christmas 2022
2038 2021 2021/2038 Christmas 0 A 1522 0 christmas 2021
11655 2021 2021/11655 Fall 0 A 1522 0 fall 2021
11437 2021 2021/11437 Food & Drink 0 A 1522 0 food-and-drink 2021
2035 2021 2021/2035 Gnomes 0 A 1522 0 gnomes 2021
2024 2022 2022/2024 Halloween 0 A 1522 0 halloween 2022
2039 2021 2021/2039 Halloween 0 A 1522 0 halloween 2021
11435 2021 2021/11435 Hobbies 0 A 1522 0 hobbies 2021
2033 2021 2021/2033 Medical 0 A 1522 0 medical 2021
11436 2021 2021/11436 Music 0 A 1522 0 music 2021
11440 2021 2021/11440 Patriotic 0 A 1522 0 patriotic 2021
11430 2022 2022/11430 Science 0 A 1522 0 science 2022
2022 0 2022 Shirts 0 A 1522 0 shirts
2037 2022 2022/2037 Sports 0 A 1522 0 sports 2022
2036 2021 2021/2036 Sports 0 A 1522 0 sports 2021
11656 2021 2021/11656 St. Patrick's Day 0 A 1522 0 st.-patricks-day 2021
2021 0 2021 SVG 0 A 1522 0 svg
2034 2021 2021/2034 Teacher 0 A 1522 0 teacher 2021
3514 2021 2021/3514 Thanksgiving 0 A 1522 0 thanksgiving 2021
2025 2022 2022/2025 Thanksgiving 0 A 1522 0 thanksgiving 2022
11439 2021 2021/11439 Truck 0 A 1522 0 truck 2021
11442 2021 2021/11442 Unicorns 0 A 1522 0 unicorns 2021
11438 2021 2021/11438 Valentine's Day 0 A 1522 0 valentines-day 2021
2026 2022 2022/2026 Valentine's Day 0 A 1522 0 valentines-day 2022
11433 2021 2021/11433 Vegan/Vegetarian 0 A 1522 0 vegan-vegetarian 2021
11657 2021 2021/11657 Wedding 0 A 1522 0 wedding 2021
11432 2021 2021/11432 Words 0 A 1522 0 words 2021