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 = 7203 
WHERE 
  cscart_products_categories.product_id IN (
    84716, 84738, 92171, 84726, 84742, 84935, 
    84858, 92175, 84740, 84942, 84934, 
    92167, 84737, 84739, 84725, 87980, 
    87983, 84741, 87984, 87970, 88023, 
    84947, 88032, 87985, 84736, 84688, 
    87979, 84960, 87978, 84850, 84743, 
    84849, 84951, 84747, 84761, 84717, 
    87969, 84846, 85274, 88022, 88017, 
    93158, 93159, 93797, 94450, 94796, 
    94797, 94802, 94803, 94807, 94808, 
    94826, 94842, 95555, 95738, 95739, 
    95740, 95741, 95742, 95754, 95819, 
    96529, 98416, 99139, 99140, 99148, 
    99149, 99150, 99156, 99157, 99159, 
    99160, 99161, 99196, 99201, 99210, 
    99211
  ) 
GROUP BY 
  cscart_products_categories.product_id

Query time 0.01674

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "69.59"
    },
    "grouping_operation": {
      "using_filesort": false,
      "nested_loop": [
        {
          "table": {
            "table_name": "cscart_products_categories",
            "access_type": "range",
            "possible_keys": [
              "PRIMARY",
              "link_type",
              "pt"
            ],
            "key": "pt",
            "used_key_parts": [
              "product_id"
            ],
            "key_length": "3",
            "rows_examined_per_scan": 77,
            "rows_produced_per_join": 77,
            "filtered": "100.00",
            "using_index": true,
            "cost_info": {
              "read_cost": "7.99",
              "eval_cost": "7.70",
              "prefix_cost": "15.69",
              "data_read_per_join": "1K"
            },
            "used_columns": [
              "product_id",
              "category_id",
              "link_type"
            ],
            "attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (84716,84738,92171,84726,84742,84935,84858,92175,84740,84942,84934,92167,84737,84739,84725,87980,87983,84741,87984,87970,88023,84947,88032,87985,84736,84688,87979,84960,87978,84850,84743,84849,84951,84747,84761,84717,87969,84846,85274,88022,88017,93158,93159,93797,94450,94796,94797,94802,94803,94807,94808,94826,94842,95555,95738,95739,95740,95741,95742,95754,95819,96529,98416,99139,99140,99148,99149,99150,99156,99157,99159,99160,99161,99196,99201,99210,99211))"
          }
        },
        {
          "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": 77,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "19.25",
              "eval_cost": "7.70",
              "prefix_cost": "42.64",
              "data_read_per_join": "1K"
            },
            "used_columns": [
              "product_id",
              "category_id",
              "position"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_categories",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY",
              "c_status",
              "p_category_id"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "category_id"
            ],
            "key_length": "3",
            "ref": [
              "nuie_scalesta_net.cscart_products_categories.category_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 3,
            "filtered": "5.00",
            "cost_info": {
              "read_cost": "19.25",
              "eval_cost": "0.39",
              "prefix_cost": "69.59",
              "data_read_per_join": "10K"
            },
            "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')))"
          }
        }
      ]
    }
  }
}

Result

product_id category_ids position
84688 7203M 0
84716 7203M 0
84717 7203M 0
84725 7203M 0
84726 7203M 0
84736 7203M 0
84737 7203M 0
84738 7203M 0
84739 7203M 0
84740 7203M 0
84741 7203M 0
84742 7203M 0
84743 7203M 0
84747 7203M 0
84761 7203M 0
84846 7203M 0
84849 7203M 0
84850 7203M 0
84858 7203M 0
84934 7203M 0
84935 7203M 0
84942 7203M 0
84947 7203M 0
84951 7203M 0
84960 7203M 0
85274 7203M 0
87969 7203M 0
87970 7203M 0
87978 7203M 0
87979 7203M 0
87980 7203M 0
87983 7203M 0
87984 7203M 0
87985 7203M 0
88017 7203M 0
88022 7203M 0
88023 7203M 0
88032 7203M 0
92167 7203M 0
92171 7203M 0
92175 7203M 0
93158 7203M 0
93159 7203M 0
93797 7203M 0
94450 7203M 0
94796 7203M 0
94797 7203M 0
94802 7203M 0
94803 7203M 0
94807 7203M 0
94808 7203M 0
94826 7203M 0
94842 7203M 0
95555 7203M 0
95738 7203M 0
95739 7203M 0
95740 7203M 0
95741 7203M 0
95742 7203M 0
95754 7203M 0
95819 7203M 0
96529 7203M 0
98416 7203M 0
99139 7203M 0
99140 7203M 0
99148 7203M 0
99149 7203M 0
99150 7203M 0
99156 7203M 0
99157 7203M 0
99159 7203M 0
99160 7203M 0
99161 7203M 0
99196 7203M 0
99201 7203M 0
99210 7203M 0
99211 7203M 0