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 
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') 
WHERE 
  cscart_products_categories.product_id IN (
    10975, 5759, 1925, 11317, 10974, 11013, 
    11023, 11027, 11315, 11314, 11313, 
    11312, 11036, 11073, 11089, 11309, 
    11302, 10884, 11300, 11256, 11257, 
    11316, 10830, 11286, 11285, 11284, 
    11283, 3875, 11282, 10638, 10870, 11031, 
    11030, 10738, 11253, 11025, 11267, 
    11266, 11265, 11264, 11263, 11262, 
    11259, 11261, 10848, 10979, 11012, 
    11024, 11090, 11234, 11235, 11258, 
    11254, 11269, 10333, 11015, 11018, 
    11019, 11238, 11251, 11307, 11308, 
    11002, 10335
  ) 
GROUP BY 
  cscart_products_categories.product_id

Query time 0.00290

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "861.87"
    },
    "grouping_operation": {
      "using_temporary_table": true,
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "12.62"
      },
      "nested_loop": [
        {
          "table": {
            "table_name": "cscart_categories",
            "access_type": "ALL",
            "possible_keys": [
              "PRIMARY",
              "c_status",
              "p_category_id"
            ],
            "rows_examined_per_scan": 125,
            "rows_produced_per_join": 5,
            "filtered": "4.00",
            "cost_info": {
              "read_cost": "28.14",
              "eval_cost": "1.00",
              "prefix_cost": "29.14",
              "data_read_per_join": "13K"
            },
            "used_columns": [
              "category_id",
              "usergroup_ids",
              "status",
              "storefront_id"
            ],
            "attached_condition": "((`ea201_francemaqu`.`cscart_categories`.`storefront_id` in (0,1)) and ((`ea201_francemaqu`.`cscart_categories`.`usergroup_ids` = '') or find_in_set(0,`ea201_francemaqu`.`cscart_categories`.`usergroup_ids`) or find_in_set(1,`ea201_francemaqu`.`cscart_categories`.`usergroup_ids`)) and (`ea201_francemaqu`.`cscart_categories`.`status` in ('A','H')))"
          }
        },
        {
          "table": {
            "table_name": "cscart_products_categories",
            "access_type": "ref",
            "possible_keys": [
              "PRIMARY",
              "pt"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "category_id"
            ],
            "key_length": "3",
            "ref": [
              "ea201_francemaqu.cscart_categories.category_id"
            ],
            "rows_examined_per_scan": 136,
            "rows_produced_per_join": 12,
            "filtered": "1.86",
            "index_condition": "(`ea201_francemaqu`.`cscart_products_categories`.`product_id` in (10975,5759,1925,11317,10974,11013,11023,11027,11315,11314,11313,11312,11036,11073,11089,11309,11302,10884,11300,11256,11257,11316,10830,11286,11285,11284,11283,3875,11282,10638,10870,11031,11030,10738,11253,11025,11267,11266,11265,11264,11263,11262,11259,11261,10848,10979,11012,11024,11090,11234,11235,11258,11254,11269,10333,11015,11018,11019,11238,11251,11307,11308,11002,10335))",
            "cost_info": {
              "read_cost": "684.10",
              "eval_cost": "2.52",
              "prefix_cost": "849.24",
              "data_read_per_join": "201"
            },
            "used_columns": [
              "product_id",
              "category_id",
              "link_type"
            ]
          }
        }
      ]
    }
  }
}

Result

product_id category_ids
1925 87,88M
3875 14,16,116,28M,2
5759 88,14M,87
10333 110M,116
10335 21M,116
10638 114,112,32,492,118M,116
10738 116,13M,9
10830 120M,9,474
10848 27,20M,5,116,492
10870 492,30,5,94M,116
10884 14,116,28M
10974 28M,2,14,116
10975 110M,116
10979 116,492,2M,449,50
11002 116,492,112M,9,32,10
11012 116,2,492,16,50M,8
11013 122M,116,14,492
11015 28M,493,116,14
11018 10M,493,9,116
11019 116,19M,5,2,493,16,46
11023 9,116,10M,13,492
11024 9,116,10M,13,492
11025 492,9,116,10,13M
11027 111M,492,449,116,2,32,50
11030 451M,114,119,492,112,116
11031 451M,114,119,492,112,116
11036 116,9,10M,492
11073 116,28M,492,14
11089 492,154M,116,119
11090 492,154M,116,119
11234 17,116,25M
11235 25M,17,116
11238 116,9,13M
11251 116,110M
11253 13M,116,9,493
11254 34M,23,24
11256 19M,116,5,46
11257 14M,28,116
11258 492,116,118M
11259 10M,9,116
11261 116,25M,17
11262 493,9,13M,116
11263 10,32M,9,116,112
11264 112,10,32,9M,116
11265 492,154M,116,5
11266 25M,17,116
11267 116,25M,17
11269 35M
11282 116,34,23M
11283 116,34,23M
11284 116,34,23M
11285 116,34,23M
11286 112,451M,114,492,116,119
11300 116,493,10,9M
11302 116,13,9M
11307 52M,154
11308 54,52M,117
11309 13,9M
11312 492,154M
11313 9M,494,116,110
11314 5M,46,27,494,116
11315 117M,116
11316 11,33M
11317 9M,13