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 = 7165 
WHERE 
  cscart_products_categories.product_id IN (
    92570, 92571, 92572, 92573, 92574, 92575, 
    92576, 92577, 92578, 92579, 92580, 
    92581, 92582, 92583, 92584, 92585, 
    92586, 92587, 92588, 92589, 92590, 
    92591, 92592, 93296, 93297, 93298, 
    93299, 93300, 93301, 93302, 93303, 
    93304, 93305, 93306, 93307, 93308, 
    93309, 93310, 93311, 93312, 93313, 
    93314, 93315, 93316, 93317, 93318, 
    93319, 93320, 93321, 93322, 93323, 
    93324, 93325, 93326, 93327, 93328, 
    93329, 93330, 93331, 93332, 93333, 
    93334, 93335, 93336, 93337, 93356, 
    93357, 93358, 93868, 93869, 93870, 
    93871, 93896, 93897, 93898, 93899, 
    93900, 93901, 93902, 93903, 93904, 
    93905, 93906, 93907, 93908, 93909, 
    93910, 93911, 93912, 93913, 93914, 
    93915, 93916, 93917, 93918, 93919
  ) 
GROUP BY 
  cscart_products_categories.product_id

Query time 0.01736

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "95.70"
    },
    "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": 106,
            "rows_produced_per_join": 106,
            "filtered": "100.00",
            "using_index": true,
            "cost_info": {
              "read_cost": "10.90",
              "eval_cost": "10.60",
              "prefix_cost": "21.50",
              "data_read_per_join": "1K"
            },
            "used_columns": [
              "product_id",
              "category_id",
              "link_type"
            ],
            "attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (92570,92571,92572,92573,92574,92575,92576,92577,92578,92579,92580,92581,92582,92583,92584,92585,92586,92587,92588,92589,92590,92591,92592,93296,93297,93298,93299,93300,93301,93302,93303,93304,93305,93306,93307,93308,93309,93310,93311,93312,93313,93314,93315,93316,93317,93318,93319,93320,93321,93322,93323,93324,93325,93326,93327,93328,93329,93330,93331,93332,93333,93334,93335,93336,93337,93356,93357,93358,93868,93869,93870,93871,93896,93897,93898,93899,93900,93901,93902,93903,93904,93905,93906,93907,93908,93909,93910,93911,93912,93913,93914,93915,93916,93917,93918,93919))"
          }
        },
        {
          "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": 106,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "26.50",
              "eval_cost": "10.60",
              "prefix_cost": "58.60",
              "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": 5,
            "filtered": "5.00",
            "cost_info": {
              "read_cost": "26.50",
              "eval_cost": "0.53",
              "prefix_cost": "95.70",
              "data_read_per_join": "13K"
            },
            "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
92570 7174M
92571 7174M
92572 7174M
92573 7174M
92574 7174M
92575 7177M
92576 7177M
92577 7177M
92578 7177M
92579 7177M
92580 7177M
92581 7177M
92582 7177M
92583 7177M
92584 7176M
92585 7176M
92586 7176M
92587 7179M
92588 7179M
92589 7179M
92590 7176M
92591 7176M
92592 7176M
93296 7168M
93297 7168M
93298 7168M
93299 7168M
93300 7168M
93301 7168M
93302 7168M
93303 7168M
93304 7168M
93305 7168M
93306 7168M
93307 7168M
93308 7168M
93309 7168M
93310 7168M
93311 7168M
93312 7168M
93313 7168M
93314 7168M
93315 7168M
93316 7168M
93317 7168M
93318 7168M
93319 7168M
93320 7168M
93321 7168M
93322 7168M
93323 7168M
93324 7168M
93325 7168M
93326 7168M
93327 7168M
93328 7168M
93329 7168M
93330 7168M
93331 7168M
93332 7168M
93333 7168M
93334 7168M
93335 7168M
93336 7168M
93337 7168M
93356 7167M,7183,7283
93357 7167M,7183,7283
93358 7167M,7183,7283
93868 7225M,7226
93869 7225M,7226
93870 7225M,7226
93871 7225M,7226
93896 7168M
93897 7168M
93898 7168M
93899 7168M
93900 7168M
93901 7168M
93902 7172M
93903 7172M
93904 7172M
93905 7172M
93906 7172M
93907 7168M
93908 7168M
93909 7168M
93910 7172M
93911 7172M
93912 7172M
93913 7168M
93914 7168M
93915 7168M
93916 7168M
93917 7168M
93918 7168M
93919 7168M