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 (
    73240, 73116, 72858, 72857, 73405, 73404, 
    73403, 73155, 73115, 73351, 73350, 
    73349, 73348, 72836, 73284, 73111, 
    71691, 68825, 49338, 44239, 44238, 
    42033, 73271, 73270, 73252, 73239, 
    73237, 73217, 73156, 73119, 72856, 
    72855, 72852, 72032, 71703, 71486, 
    71485, 71484, 71483, 73020
  ) 
GROUP BY 
  cscart_products_categories.product_id

Query time 0.00063

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
42033 6M 0
44238 6M 0
44239 6M 0
49338 6M 0
68825 6M 0
71483 6M 0
71484 6M 0
71485 6M 0
71486 6M 0
71691 6M 0
71703 6M 0
72032 6M 0
72836 6M 0
72852 6M 0
72855 6M 0
72856 6M 0
72857 6M 0
72858 6M 0
73020 6M 0
73111 6M 0
73115 6M 0
73116 6M 0
73119 6M 0
73155 6M 0
73156 6M 0
73217 6M 0
73237 6M 0
73239 6M 0
73240 6M 0
73252 6M 0
73270 6M 0
73271 6M 0
73284 6M 0
73348 6M 0
73349 6M 0
73350 6M 0
73351 6M 0
73403 6M 0
73404 6M 0
73405 6M 0