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 = 10 
WHERE 
  cscart_products_categories.product_id IN (
    1233, 1234, 1232, 1231, 1222, 105, 71, 
    104, 72, 34, 36, 1175, 1911, 1245, 99, 
    1311, 78, 100, 98, 88, 1319, 85, 1280, 
    1279, 283, 1247, 1110, 985, 1300, 1035, 
    1028, 603, 1268, 1269, 1392, 1380, 1391, 
    1388, 968, 1163, 84, 38, 1162, 1299, 
    1350, 1314, 154, 1328, 1329, 1326, 1327, 
    22, 35, 1511, 1298, 1297, 83
  ) 
GROUP BY 
  cscart_products_categories.product_id

Query time 0.00210

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": 59,
      "filtered": 100,
      "index_condition": "cscart_products_categories.product_id in (1233,1234,1232,1231,1222,105,71,104,72,34,36,1175,1911,1245,99,1311,78,100,98,88,1319,85,1280,1279,283,1247,1110,985,1300,1035,1028,603,1268,1269,1392,1380,1391,1388,968,1163,84,38,1162,1299,1350,1314,154,1328,1329,1326,1327,22,35,1511,1298,1297,83)"
    },
    "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": ["bacpvdev_db.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')"
    },
    "table": {
      "table_name": "product_position_source",
      "access_type": "eq_ref",
      "possible_keys": ["PRIMARY", "pt"],
      "key": "PRIMARY",
      "key_length": "6",
      "used_key_parts": ["category_id", "product_id"],
      "ref": ["const", "bacpvdev_db.cscart_products_categories.product_id"],
      "rows": 1,
      "filtered": 100
    }
  }
}

Result

product_id category_ids position
22 10M 0
34 10M 0
35 10M 0
36 10M 0
38 10M 0
71 10M 0
72 10M 0
78 10M 0
83 10M 0
84 10M 0
85 10M 0
88 10M 0
98 10M 0
99 10M 0
100 10M 0
104 10M 0
105 10M 0
154 10M 0
283 10M 0
603 10M 0
968 10M 0
985 10M 0
1028 10M 0
1035 10M 0
1110 10M 0
1162 10M 0
1163 10M 0
1175 10M 0
1222 10M 0
1231 10M 0
1232 10M 0
1233 10M 0
1234 10M 0
1245 10M 0
1247 10M 0
1268 10M 0
1269 10M 0
1279 10M 0
1280 10M 0
1297 10M 0
1298 10M 0
1299 10M 0
1300 10M 0
1311 10M 0
1314 10M 0
1319 10M 0
1326 10M 0
1327 10M 0
1328 10M 0
1329 10M 0
1350 10M 0
1380 10M 0
1388 10M 0
1391 10M 0
1392 10M 0
1511 10M 0
1911 10M 0