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 = 2910 
WHERE 
  cscart_products_categories.product_id IN (
    356857, 357446, 359239, 350620, 350984, 
    352917, 353399, 356900, 358338, 350309, 
    353610, 354728, 350229, 350742, 351676, 
    352522, 353366, 354011, 354588, 354704, 
    356925, 356965, 357318, 357817, 358076, 
    349833, 351402, 351566, 352188, 352490, 
    352928, 353015, 354506, 354819, 356370, 
    357163, 349859, 350660, 351209, 355302, 
    356337, 351479, 352968, 353475, 355268, 
    356430, 351214, 351430, 355848, 357712, 
    358033, 359020, 359087, 349720, 349725, 
    352106, 352744, 356760, 357577, 358534, 
    359106, 354314, 355171, 356202, 356856, 
    357679, 359407, 350328, 351821, 353503, 
    359090, 349933, 349945, 350679, 353319, 
    353354, 353553, 353665, 354857, 355777, 
    358155, 358977, 352629, 352902, 353003, 
    353548, 353728, 354076, 354666, 354686, 
    358304, 350171, 350808, 351046, 351374, 
    352198, 352915, 352964, 355521, 355596
  ) 
GROUP BY 
  cscart_products_categories.product_id

Query time 0.00293

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "281.15"
    },
    "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": 100,
            "rows_produced_per_join": 100,
            "filtered": "100.00",
            "using_index": true,
            "cost_info": {
              "read_cost": "21.15",
              "eval_cost": "20.00",
              "prefix_cost": "41.15",
              "data_read_per_join": "1K"
            },
            "used_columns": [
              "product_id",
              "category_id",
              "link_type"
            ],
            "attached_condition": "(`webmarco`.`cscart_products_categories`.`product_id` in (356857,357446,359239,350620,350984,352917,353399,356900,358338,350309,353610,354728,350229,350742,351676,352522,353366,354011,354588,354704,356925,356965,357318,357817,358076,349833,351402,351566,352188,352490,352928,353015,354506,354819,356370,357163,349859,350660,351209,355302,356337,351479,352968,353475,355268,356430,351214,351430,355848,357712,358033,359020,359087,349720,349725,352106,352744,356760,357577,358534,359106,354314,355171,356202,356856,357679,359407,350328,351821,353503,359090,349933,349945,350679,353319,353354,353553,353665,354857,355777,358155,358977,352629,352902,353003,353548,353728,354076,354666,354686,358304,350171,350808,351046,351374,352198,352915,352964,355521,355596))"
          }
        },
        {
          "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",
              "webmarco.cscart_products_categories.product_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 100,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "100.00",
              "eval_cost": "20.00",
              "prefix_cost": "161.15",
              "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": [
              "webmarco.cscart_products_categories.category_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 5,
            "filtered": "5.00",
            "cost_info": {
              "read_cost": "100.00",
              "eval_cost": "1.00",
              "prefix_cost": "281.15",
              "data_read_per_join": "29K"
            },
            "used_columns": [
              "category_id",
              "usergroup_ids",
              "status",
              "storefront_id"
            ],
            "attached_condition": "((`webmarco`.`cscart_categories`.`storefront_id` in (0,1)) and ((`webmarco`.`cscart_categories`.`usergroup_ids` = '') or find_in_set(0,`webmarco`.`cscart_categories`.`usergroup_ids`) or find_in_set(1,`webmarco`.`cscart_categories`.`usergroup_ids`)) and (`webmarco`.`cscart_categories`.`status` in ('A','H')))"
          }
        }
      ]
    }
  }
}

Result

product_id category_ids position
349720 2916M
349725 2916M
349833 2916M
349859 2916M
349933 2916M
349945 2916M
350171 2916M
350229 2913M
350309 2913M
350328 2913M
350620 2920M
350660 2920M
350679 2920M
350742 2920M
350808 2920M
350984 2920M
351046 2920M
351209 2920M
351214 2920M
351374 2916M
351402 2916M
351430 2916M
351479 2920M
351566 2916M
351676 2920M
351821 2916M
352106 2916M
352188 2916M
352198 2916M
352490 2916M
352522 2916M
352629 2916M
352744 2916M
352902 3105M
352915 3105M
352917 3408M
352928 3105M
352964 3408M
352968 3408M
353003 3105M
353015 3105M
353319 3408M
353354 3408M
353366 3408M
353399 3408M
353475 3105M
353503 3105M
353548 3408M
353553 3408M
353610 3105M
353665 3105M
353728 3105M
354011 3105M
354076 3105M
354314 2913M
354506 2916M
354588 3105M
354666 3105M
354686 3105M
354704 2916M
354728 3105M
354819 2916M
354857 2916M
355171 2920M
355268 2920M
355302 2920M
355521 3105M
355596 2916M
355777 2916M
355848 2916M
356202 2916M
356337 2916M
356370 2916M
356430 2916M
356760 3105M
356856 3105M
356857 3105M
356900 3105M
356925 3105M
356965 3105M
357163 2920M
357318 2920M
357446 2916M
357577 2916M
357679 2920M
357712 2920M
357817 2920M
358033 2920M
358076 2920M
358155 2920M
358304 3408M
358338 3408M
358534 2916M
358977 2916M
359020 2916M
359087 2916M
359090 2916M
359106 2920M
359239 2920M
359407 2916M