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 (
    13774, 11496, 13784, 11492, 11505, 11513, 
    13773, 11495, 13785, 11508, 13777, 
    11494, 11507, 13778, 11502, 11519, 
    11575, 11574, 11506, 13779, 11504, 
    13780, 11501, 13782
  ) 
GROUP BY 
  cscart_products_categories.product_id

Query time 0.00069

JSON explain

{
  "query_block": {
    "select_id": 1,
    "table": {
      "table_name": "cscart_products_categories",
      "access_type": "range",
      "possible_keys": ["PRIMARY", "pt"],
      "key": "pt",
      "key_length": "3",
      "used_key_parts": ["product_id"],
      "rows": 55,
      "filtered": 100,
      "index_condition": "cscart_products_categories.product_id in (13774,11496,13784,11492,11505,11513,13773,11495,13785,11508,13777,11494,11507,13778,11502,11519,11575,11574,11506,13779,11504,13780,11501,13782)"
    },
    "table": {
      "table_name": "cscart_categories",
      "access_type": "eq_ref",
      "possible_keys": ["PRIMARY", "c_status", "p_category_id"],
      "key": "PRIMARY",
      "key_length": "3",
      "used_key_parts": ["category_id"],
      "ref": ["ymonline_livedata.cscart_products_categories.category_id"],
      "rows": 1,
      "filtered": 100,
      "attached_condition": "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')"
    }
  }
}

Result

product_id category_ids
11492 503M
11494 503,501,277M
11495 503,277M
11496 503,277M
11501 503,502,501,277M
11502 503,502,501,277M
11504 503,502,501,277M
11505 503,502,501,277M
11506 503,502,501,277M
11507 503,502,501,277M
11508 503,502,501,277M
11513 503,502,501,277M
11519 503,502,501,277M
11574 273M
11575 273M
13773 473M
13774 473M
13777 473M
13778 473M
13779 473M
13780 473M
13782 473M
13784 473M
13785 473M