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 = 280 
WHERE 
  cscart_products_categories.product_id IN (
    9881, 9896, 9892, 10481, 9876, 10474, 
    10491, 10489, 10471, 9880, 10472, 9885, 
    10488, 9897, 9895, 10467, 9900, 10470, 
    10466, 10477, 9889, 10475, 9890, 10483, 
    10495, 10490, 10469, 9877, 9894, 9891, 
    10480, 9893, 9878, 9886, 9882, 9888, 
    10482, 9776, 9777, 9781, 9775, 9778, 
    9779, 9780, 9782, 9790, 9787, 9791, 
    9792, 9795, 9784, 9785, 9783, 9786, 
    9788, 13031, 13032, 13033, 13034, 13035, 
    13036, 13037, 13038, 13039, 13040, 
    13041, 13042, 13043, 13044, 10840, 
    10841, 10842, 10843, 10844, 10845, 
    10846, 10847, 13152
  ) 
GROUP BY 
  cscart_products_categories.product_id

Query time 0.00873

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": 78,
      "filtered": 100,
      "index_condition": "cscart_products_categories.product_id in (9881,9896,9892,10481,9876,10474,10491,10489,10471,9880,10472,9885,10488,9897,9895,10467,9900,10470,10466,10477,9889,10475,9890,10483,10495,10490,10469,9877,9894,9891,10480,9893,9878,9886,9882,9888,10482,9776,9777,9781,9775,9778,9779,9780,9782,9790,9787,9791,9792,9795,9784,9785,9783,9786,9788,13031,13032,13033,13034,13035,13036,13037,13038,13039,13040,13041,13042,13043,13044,10840,10841,10842,10843,10844,10845,10846,10847,13152)"
    },
    "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",
        "noframes_angrybeaver.cscart_products_categories.product_id"
      ],
      "rows": 1,
      "filtered": 100
    },
    "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": ["noframes_angrybeaver.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 position
9775 308M
9776 308M
9777 308M
9778 308M
9779 308M
9780 308M
9781 308M
9782 308M
9783 308M
9784 308M
9785 308M
9786 308M
9787 308M
9788 308M
9790 308M
9791 308M
9792 308M
9795 308M
9876 327M
9877 327M
9878 327M
9880 327M
9881 327M
9882 327M
9885 327M
9886 327M
9888 327M
9889 327M
9890 327M
9891 327M
9892 327M
9893 327M
9894 327M
9895 327M
9896 327M
9897 327M
9900 327M
10466 327M
10467 327M
10469 327M
10470 327M
10471 327M
10472 327M
10474 327M
10475 327M
10477 327M
10480 327M
10481 327M
10482 327M
10483 327M
10488 327M
10489 327M
10490 327M
10491 327M
10495 327M
10840 667M
10841 667M
10842 667M
10843 667M
10844 667M
10845 667M
10846 667M
10847 667M
13031 313,301M
13032 313,301M
13033 313,301M
13034 313,301M
13035 313,301M
13036 313,301M
13037 313,301M
13038 313,301M
13039 313,301M
13040 313,301M
13041 313,301M
13042 313,301M
13043 313,301M
13044 313,301M
13152 667M