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 = 6 
WHERE 
  cscart_products_categories.product_id IN (
    65260, 65340, 65210, 64553, 65258, 65257, 
    65256, 65255, 65254, 65253, 65252, 
    65251, 65250, 65249, 65248, 65247, 
    65246, 65245, 65244, 65243, 65242, 
    65241, 65240, 65239, 65238, 65237, 
    65236, 65235, 65234, 65233, 65232, 
    65231, 65230, 65229, 65163, 65162, 
    65161, 65160, 65159, 65114
  ) 
GROUP BY 
  cscart_products_categories.product_id

Query time 0.00068

Explain
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE cscart_products_categories range PRIMARY,pt pt 3 40 Using where; Using index
1 SIMPLE cscart_categories eq_ref PRIMARY,c_status,p_category_id PRIMARY 3 toolboxdigitalshop_dev.cscart_products_categories.category_id 1 Using where
1 SIMPLE product_position_source eq_ref PRIMARY,pt PRIMARY 6 const,toolboxdigitalshop_dev.cscart_products_categories.product_id 1

Result

product_id category_ids position
64553 6M 0
65114 6M 0
65159 6M 0
65160 6M 0
65161 6M 0
65162 6M 0
65163 6M 0
65210 6M 0
65229 6M 0
65230 6M 0
65231 6M 0
65232 6M 0
65233 6M 0
65234 6M 0
65235 6M 0
65236 6M 0
65237 6M 0
65238 6M 0
65239 6M 0
65240 6M 0
65241 6M 0
65242 6M 0
65243 6M 0
65244 6M 0
65245 6M 0
65246 6M 0
65247 6M 0
65248 6M 0
65249 6M 0
65250 6M 0
65251 6M 0
65252 6M 0
65253 6M 0
65254 6M 0
65255 6M 0
65256 6M 0
65257 6M 0
65258 6M 0
65260 6M 0
65340 6M 0