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 = 11 
WHERE 
  cscart_products_categories.product_id IN (
    710, 706, 1760, 1844, 1689, 1754, 1755, 
    1840, 1756, 1753, 1792, 1791, 1793, 
    1789, 1472, 1716, 1714, 1715, 1720, 
    1719, 1722, 1713, 1718, 1717, 1867, 
    1721, 1145, 1891, 1202, 247, 296, 1218, 
    1765, 820, 1816, 1651, 1661, 255, 65, 
    1959, 1011, 1685, 1207, 1210, 1203, 
    1389, 1188, 1190, 1209, 1186, 114, 1810, 
    113, 1742, 1598, 1565, 1597, 1708, 1694, 
    1732, 1596, 1632, 79, 297, 1852, 1456, 
    653, 1465, 1494, 1620, 1619, 1457, 1618, 
    1623, 1624, 1395, 1614, 1604, 1801, 
    1802, 1724, 1727, 1726, 1599, 1725, 
    1600, 1872, 1603, 1560, 1513, 1550, 
    1548, 1547, 1763, 1764, 1506
  ) 
GROUP BY 
  cscart_products_categories.product_id

Query time 0.00401

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": 100,
      "filtered": 100,
      "index_condition": "cscart_products_categories.product_id in (710,706,1760,1844,1689,1754,1755,1840,1756,1753,1792,1791,1793,1789,1472,1716,1714,1715,1720,1719,1722,1713,1718,1717,1867,1721,1145,1891,1202,247,296,1218,1765,820,1816,1651,1661,255,65,1959,1011,1685,1207,1210,1203,1389,1188,1190,1209,1186,114,1810,113,1742,1598,1565,1597,1708,1694,1732,1596,1632,79,297,1852,1456,653,1465,1494,1620,1619,1457,1618,1623,1624,1395,1614,1604,1801,1802,1724,1727,1726,1599,1725,1600,1872,1603,1560,1513,1550,1548,1547,1763,1764,1506)"
    },
    "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
65 12M
79 25M
113 25M
114 25M
247 24M
255 13M
296 24M
297 12M
653 25M
706 24M
710 24M
820 24M
1011 12M
1145 24M
1186 35M
1188 35M
1190 35M
1202 24M
1203 35M
1207 35M
1209 35M
1210 35M
1218 25M
1389 35M
1395 11M 0
1456 35M
1457 35M
1465 25M
1472 24M
1494 25M
1506 13M
1513 13M
1547 13M
1548 13M
1550 13M
1560 13M
1565 13M
1596 13M
1597 13M
1598 13M
1599 13M
1600 13M
1603 13M
1604 13M
1614 13M
1618 13M
1619 25M
1620 25M
1623 13M
1624 25M
1632 13M
1651 13M
1661 13M
1685 35M
1689 24M
1694 13M
1708 13M
1713 35M
1714 35M
1715 35M
1716 35M
1717 35M
1718 35M
1719 35M
1720 35M
1721 35M
1722 35M
1724 13M
1725 13M
1726 13M
1727 13M
1732 13M
1742 13M
1753 24M
1754 24M
1755 24M
1756 24M
1760 24M
1763 13M
1764 13M
1765 24M
1789 35M
1791 35M
1792 35M
1793 35M
1801 13M
1802 13M
1810 25M
1816 24M
1840 24M
1844 24M
1852 35M
1867 35M
1872 13M
1891 25M
1959 12M