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 = 7175 
WHERE 
  cscart_products_categories.product_id IN (
    89547, 89543, 89546, 85620, 89544, 85618, 
    89542, 85616, 85619, 85617, 85615, 
    93928, 93929, 93930, 93931, 93932, 
    93933, 93934, 93935, 93936, 94992, 
    94993, 94994, 94995, 94996, 94997, 
    94998, 94999, 95000, 95001, 95002, 
    95003, 95451, 95523, 95524, 95525, 
    95533, 95534, 95535, 95549, 95550, 
    95551, 96875, 96876, 96877, 96878, 
    96879, 96880, 96881, 96882, 96883, 
    96884, 96885, 96886, 98512, 98513, 
    98514, 100218, 100219, 100220, 100221, 
    100222, 100223, 100224, 100225, 100226, 
    100311, 100313, 100315, 100318, 100320, 
    101037
  ) 
GROUP BY 
  cscart_products_categories.product_id

Query time 0.01956

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "65.08"
    },
    "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": 72,
            "rows_produced_per_join": 72,
            "filtered": "100.00",
            "using_index": true,
            "cost_info": {
              "read_cost": "7.49",
              "eval_cost": "7.20",
              "prefix_cost": "14.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 (89547,89543,89546,85620,89544,85618,89542,85616,85619,85617,85615,93928,93929,93930,93931,93932,93933,93934,93935,93936,94992,94993,94994,94995,94996,94997,94998,94999,95000,95001,95002,95003,95451,95523,95524,95525,95533,95534,95535,95549,95550,95551,96875,96876,96877,96878,96879,96880,96881,96882,96883,96884,96885,96886,98512,98513,98514,100218,100219,100220,100221,100222,100223,100224,100225,100226,100311,100313,100315,100318,100320,101037))"
          }
        },
        {
          "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": 72,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "18.00",
              "eval_cost": "7.20",
              "prefix_cost": "39.89",
              "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": "18.00",
              "eval_cost": "0.36",
              "prefix_cost": "65.09",
              "data_read_per_join": "9K"
            },
            "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
85615 7175M 0
85616 7175M 0
85617 7175M 0
85618 7175M 0
85619 7175M 0
85620 7175M 0
89542 7175M 0
89543 7175M 0
89544 7175M 0
89546 7175M 0
89547 7175M 0
93928 7175M 0
93929 7175M 0
93930 7175M 0
93931 7175M 0
93932 7175M 0
93933 7175M 0
93934 7175M 0
93935 7175M 0
93936 7175M 0
94992 7175M 0
94993 7175M 0
94994 7175M 0
94995 7175M 0
94996 7175M 0
94997 7175M 0
94998 7175M 0
94999 7175M 0
95000 7175M 0
95001 7175M 0
95002 7175M 0
95003 7175M 0
95451 7175M 0
95523 7175M 0
95524 7175M 0
95525 7175M 0
95533 7175M 0
95534 7175M 0
95535 7175M 0
95549 7175M 0
95550 7175M 0
95551 7175M 0
96875 7175M 0
96876 7175M 0
96877 7175M 0
96878 7175M 0
96879 7175M 0
96880 7175M 0
96881 7175M 0
96882 7175M 0
96883 7175M 0
96884 7175M 0
96885 7175M 0
96886 7175M 0
98512 7175M 0
98513 7175M 0
98514 7175M 0
100218 7175M 0
100219 7175M 0
100220 7175M 0
100221 7175M 0
100222 7175M 0
100223 7175M 0
100224 7175M 0
100225 7175M 0
100226 7175M 0
100311 7175M 0
100313 7175M 0
100315 7175M 0
100318 7175M 0
100320 7175M 0
101037 7175M 0