SELECT 
  cscart_products_categories.product_id, 
  GROUP_CONCAT(
    IF(
      cscart_products_categories.link_type = "M", 
      CONCAT(
        cscart_products_categories.category_id, 
        "M"
      ), 
      cscart_products_categories.category_id
    )
  ) AS category_ids, 
  product_position_source.position AS position 
FROM 
  cscart_products_categories 
  INNER JOIN cscart_categories ON cscart_categories.category_id = cscart_products_categories.category_id 
  AND cscart_categories.storefront_id IN (0, 1) 
  AND (
    cscart_categories.usergroup_ids = '' 
    OR FIND_IN_SET(
      0, cscart_categories.usergroup_ids
    ) 
    OR FIND_IN_SET(
      1, cscart_categories.usergroup_ids
    )
  ) 
  AND cscart_categories.status IN ('A', 'H') 
  LEFT JOIN cscart_products_categories AS product_position_source ON cscart_products_categories.product_id = product_position_source.product_id 
  AND product_position_source.category_id = 7211 
WHERE 
  cscart_products_categories.product_id IN (
    88958, 88986, 88168, 88216, 89842, 89894, 
    89967, 91533, 84770, 84783, 84792, 
    87538, 88418, 89787, 89791, 88754, 
    88942, 85664, 85684, 85696, 85708, 
    85669, 85689, 85701, 85713, 88969, 
    88970, 88973, 88974, 85730, 85747, 
    85757, 85767, 84765, 85660, 85677, 
    88554, 88660, 88661, 88707, 88708, 
    85721, 85738, 85748, 85758, 85737, 
    89455, 89468, 89476, 89484, 87449, 
    88494, 91436, 91450, 88446, 88463, 
    88479, 89020, 89790, 88753, 88796, 
    89785, 85718, 89460, 88967, 88968, 
    88971, 88972, 88955, 88956, 88659, 
    88706, 88167, 88175, 88215, 88223, 
    84774, 84787, 84796, 88192, 88204, 
    88400, 88953, 88954, 84769, 84782, 
    84791, 87879, 88763, 85663, 85683, 
    85695, 85707, 88172, 88220, 84778
  ) 
GROUP BY 
  cscart_products_categories.product_id

Query time 0.01749

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "137.49"
    },
    "grouping_operation": {
      "using_temporary_table": true,
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "11.66"
      },
      "nested_loop": [
        {
          "table": {
            "table_name": "cscart_categories",
            "access_type": "ALL",
            "possible_keys": [
              "PRIMARY",
              "c_status",
              "p_category_id"
            ],
            "rows_examined_per_scan": 208,
            "rows_produced_per_join": 8,
            "filtered": "4.00",
            "cost_info": {
              "read_cost": "20.72",
              "eval_cost": "0.83",
              "prefix_cost": "21.55",
              "data_read_per_join": "21K"
            },
            "used_columns": [
              "category_id",
              "usergroup_ids",
              "status",
              "storefront_id"
            ],
            "attached_condition": "((`nuie_scalesta_net`.`cscart_categories`.`storefront_id` in (0,1)) and ((`nuie_scalesta_net`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`nuie_scalesta_net`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`nuie_scalesta_net`.`cscart_categories`.`usergroup_ids`))) and (`nuie_scalesta_net`.`cscart_categories`.`status` in ('A','H')))"
          }
        },
        {
          "table": {
            "table_name": "cscart_products_categories",
            "access_type": "ref",
            "possible_keys": [
              "PRIMARY",
              "link_type",
              "pt"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "category_id"
            ],
            "key_length": "3",
            "ref": [
              "nuie_scalesta_net.cscart_categories.category_id"
            ],
            "rows_examined_per_scan": 117,
            "rows_produced_per_join": 11,
            "filtered": "1.19",
            "cost_info": {
              "read_cost": "2.33",
              "eval_cost": "1.17",
              "prefix_cost": "121.75",
              "data_read_per_join": "186"
            },
            "used_columns": [
              "product_id",
              "category_id",
              "link_type"
            ],
            "attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (88958,88986,88168,88216,89842,89894,89967,91533,84770,84783,84792,87538,88418,89787,89791,88754,88942,85664,85684,85696,85708,85669,85689,85701,85713,88969,88970,88973,88974,85730,85747,85757,85767,84765,85660,85677,88554,88660,88661,88707,88708,85721,85738,85748,85758,85737,89455,89468,89476,89484,87449,88494,91436,91450,88446,88463,88479,89020,89790,88753,88796,89785,85718,89460,88967,88968,88971,88972,88955,88956,88659,88706,88167,88175,88215,88223,84774,84787,84796,88192,88204,88400,88953,88954,84769,84782,84791,87879,88763,85663,85683,85695,85707,88172,88220,84778))"
          }
        },
        {
          "table": {
            "table_name": "product_position_source",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY",
              "pt"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "category_id",
              "product_id"
            ],
            "key_length": "6",
            "ref": [
              "const",
              "nuie_scalesta_net.cscart_products_categories.product_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 11,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "2.92",
              "eval_cost": "1.17",
              "prefix_cost": "125.83",
              "data_read_per_join": "186"
            },
            "used_columns": [
              "product_id",
              "category_id",
              "position"
            ]
          }
        }
      ]
    }
  }
}

Result

product_id category_ids position
84765 7210,7211,7212M 0
84769 7210,7211,7212M 0
84770 7210,7211,7212M 0
84774 7210,7211,7214M 0
84778 7210,7211,7214M 0
84782 7210,7211,7212M 0
84783 7210,7211,7212M 0
84787 7210,7211,7214M 0
84791 7210,7211,7212M 0
84792 7210,7211,7212M 0
84796 7210,7211,7214M 0
85660 7210,7211,7212M 0
85663 7210,7211,7212M 0
85664 7210,7211,7212M 0
85669 7210,7211,7214M 0
85677 7210,7211,7214M 0
85683 7210,7211,7212M 0
85684 7210,7211,7212M 0
85689 7210,7211,7214M 0
85695 7210,7211,7212M 0
85696 7210,7211,7212M 0
85701 7210,7211,7214M 0
85707 7210,7211,7212M 0
85708 7210,7211,7212M 0
85713 7210,7211,7214M 0
85718 7210,7211,7212M 0
85721 7210,7211,7212M 0
85730 7210,7211,7214M 0
85737 7210,7211,7214M 0
85738 7210,7211,7212M 0
85747 7210,7211,7214M 0
85748 7210,7211,7212M 0
85757 7210,7211,7214M 0
85758 7210,7211,7212M 0
85767 7210,7211,7214M 0
87449 7210,7211,7212M 0
87538 7210,7211,7212M 0
87879 7208M,7241,7309,7346
88167 7210,7211,7212M 0
88168 7210,7211,7212M 0
88172 7210,7211,7214M 0
88175 7210,7211,7214M 0
88192 7210,7211,7212M 0
88204 7210,7211,7212M 0
88215 7210,7211,7212M 0
88216 7210,7211,7212M 0
88220 7210,7211,7214M 0
88223 7210,7211,7214M 0
88400 7210,7211,7212M 0
88418 7210,7211,7212M 0
88446 7210,7211,7212M 0
88463 7210,7211,7212M 0
88479 7210,7211,7212M 0
88494 7210,7211,7212M 0
88554 7210,7211,7282M 0
88659 7210,7211,7282M 0
88660 7210,7211,7282M 0
88661 7210,7211,7282M 0
88706 7210,7211,7282M 0
88707 7210,7211,7282M 0
88708 7210,7211,7282M 0
88753 7210,7211,7282M 0
88754 7210,7211,7282M 0
88763 7210,7211,7282M 0
88796 7210,7211,7282M 0
88942 7208M,7241,7309,7346
88953 7208M,7241,7309,7346
88954 7208M,7241,7309,7346
88955 7208M,7241,7309,7346
88956 7208M,7241,7309,7346
88958 7208M,7241,7309,7346
88967 7208M,7241,7309,7346
88968 7208M,7241,7309,7346
88969 7208M,7241,7309,7346
88970 7208M,7241,7309,7346
88971 7208M,7241,7309,7346
88972 7208M,7241,7309,7346
88973 7208M,7241,7309,7346
88974 7208M,7241,7309,7346
88986 7210,7211,7212M 0
89020 7210,7211,7212M 0
89455 7210,7211,7214M 0
89460 7210,7211,7214M 0
89468 7210,7211,7214M 0
89476 7210,7211,7214M 0
89484 7210,7211,7214M 0
89785 7210,7211,7212M 0
89787 7210,7211,7212M 0
89790 7210,7211,7214M 0
89791 7210,7211,7214M 0
89842 7210,7211,7214M 0
89894 7210,7211,7214M 0
89967 7210,7211,7214M 0
91436 7210M,7211 0
91450 7210M,7211 0
91533 7210M,7211 0