SELECT 
  jmj_categories.category_id, 
  jmj_categories.parent_id, 
  jmj_categories.id_path, 
  jmj_category_descriptions.category, 
  jmj_categories.position, 
  jmj_categories.status, 
  jmj_categories.company_id, 
  jmj_categories.storefront_id, 
  jmj_categories.ab__lc_catalog_image_control, 
  jmj_categories.ab__fn_category_status, 
  jmj_categories.ab__fn_label_color, 
  jmj_categories.ab__fn_label_background, 
  jmj_categories.ab__fn_use_origin_image, 
  jmj_category_descriptions.ab__fn_label_text, 
  jmj_category_descriptions.ab__fn_label_show 
FROM 
  jmj_categories 
  LEFT JOIN jmj_category_descriptions ON jmj_categories.category_id = jmj_category_descriptions.category_id 
  AND jmj_category_descriptions.lang_code = 'en' 
WHERE 
  1 = 1 
  AND (
    jmj_categories.usergroup_ids = '' 
    OR FIND_IN_SET(0, jmj_categories.usergroup_ids) 
    OR FIND_IN_SET(1, jmj_categories.usergroup_ids)
  ) 
  AND jmj_categories.status IN ('A') 
  AND jmj_categories.parent_id IN (45) 
  AND jmj_categories.id_path LIKE '2/45/%' 
  AND jmj_categories.category_id != 1 
  AND jmj_categories.parent_id != 1 
  AND jmj_categories.storefront_id IN (0, 1) 
  AND jmj_categories.category_id IN(
    3, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 
    19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 
    29, 30, 2, 36, 31, 32, 33, 34, 35, 37, 38, 
    39, 40, 41, 42, 43, 44, 45, 47, 48, 49, 
    50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 
    46, 60, 61, 62, 63, 64, 65, 66, 4, 67, 69, 
    70, 71, 73, 74, 75, 76, 77, 68, 83, 84, 
    85, 86, 78, 79, 88, 5, 89, 92, 93, 94, 95, 
    96, 90, 97, 98, 99, 91, 100, 101, 102, 
    103, 82, 104, 105, 106, 107, 108, 80, 
    109, 110, 111, 112, 113, 114, 115, 81, 
    116, 117, 118, 119, 120, 121, 122
  ) 
ORDER BY 
  jmj_categories.is_trash asc, 
  jmj_categories.position asc, 
  jmj_category_descriptions.category asc

Query time 0.00239

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "14.73"
    },
    "ordering_operation": {
      "using_temporary_table": true,
      "using_filesort": true,
      "nested_loop": [
        {
          "table": {
            "table_name": "jmj_categories",
            "access_type": "ref",
            "possible_keys": [
              "PRIMARY",
              "c_status",
              "parent",
              "id_path",
              "p_category_id"
            ],
            "key": "parent",
            "used_key_parts": [
              "parent_id"
            ],
            "key_length": "3",
            "ref": [
              "const"
            ],
            "rows_examined_per_scan": 13,
            "rows_produced_per_join": 0,
            "filtered": "0.83",
            "cost_info": {
              "read_cost": "12.00",
              "eval_cost": "0.02",
              "prefix_cost": "14.60",
              "data_read_per_join": "430"
            },
            "used_columns": [
              "category_id",
              "parent_id",
              "id_path",
              "company_id",
              "usergroup_ids",
              "status",
              "position",
              "is_trash",
              "ab__fn_category_status",
              "ab__fn_label_color",
              "ab__fn_label_background",
              "ab__fn_use_origin_image",
              "ab__lc_catalog_image_control",
              "storefront_id"
            ],
            "attached_condition": "(((`jmj_test`.`jmj_categories`.`usergroup_ids` = '') or find_in_set(0,`jmj_test`.`jmj_categories`.`usergroup_ids`) or find_in_set(1,`jmj_test`.`jmj_categories`.`usergroup_ids`)) and (`jmj_test`.`jmj_categories`.`status` = 'A') and (`jmj_test`.`jmj_categories`.`id_path` like '2/45/%') and (`jmj_test`.`jmj_categories`.`category_id` <> 1) and (`jmj_test`.`jmj_categories`.`storefront_id` in (0,1)) and (`jmj_test`.`jmj_categories`.`category_id` in (3,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,2,36,31,32,33,34,35,37,38,39,40,41,42,43,44,45,47,48,49,50,51,52,53,54,55,56,57,58,59,46,60,61,62,63,64,65,66,4,67,69,70,71,73,74,75,76,77,68,83,84,85,86,78,79,88,5,89,92,93,94,95,96,90,97,98,99,91,100,101,102,103,82,104,105,106,107,108,80,109,110,111,112,113,114,115,81,116,117,118,119,120,121,122)))"
          }
        },
        {
          "table": {
            "table_name": "jmj_category_descriptions",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "category_id",
              "lang_code"
            ],
            "key_length": "9",
            "ref": [
              "jmj_test.jmj_categories.category_id",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 0,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.11",
              "eval_cost": "0.02",
              "prefix_cost": "14.73",
              "data_read_per_join": "369"
            },
            "used_columns": [
              "category_id",
              "lang_code",
              "category",
              "ab__fn_label_text",
              "ab__fn_label_show"
            ]
          }
        }
      ]
    }
  }
}

Result

category_id parent_id id_path category position status company_id storefront_id ab__lc_catalog_image_control ab__fn_category_status ab__fn_label_color ab__fn_label_background ab__fn_use_origin_image ab__fn_label_text ab__fn_label_show
47 45 2/45/47 Tops 10 A 0 0 none Y #ffffff #333333 N Y
48 45 2/45/48 T-Shirts 20 A 0 0 none Y #ffffff #333333 N Y
49 45 2/45/49 Shirts 30 A 0 0 none Y #ffffff #333333 N Y
51 45 2/45/51 Sweat Shirts 40 A 0 0 none Y #ffffff #333333 N Y
50 45 2/45/50 Shrugs 50 A 0 0 none Y #ffffff #333333 N Y
52 45 2/45/52 Sweaters 60 A 0 0 none Y #ffffff #333333 N Y
53 45 2/45/53 Jackets 70 A 0 0 none Y #ffffff #333333 N Y
54 45 2/45/54 Blazers & Coats 80 A 0 0 none Y #ffffff #333333 N Y
57 45 2/45/57 Suits 90 A 0 0 none Y #ffffff #333333 N Y
59 45 2/45/59 Dresses 100 A 0 0 none Y #ffffff #333333 N Y
55 45 2/45/55 Jump Suits 110 A 0 0 none Y #ffffff #333333 N Y
56 45 2/45/56 Track Suits 120 A 0 0 none Y #ffffff #333333 N Y
58 45 2/45/58 Rain Coats 130 A 0 0 none Y #ffffff #333333 N Y