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 = 22 
WHERE 
  cscart_products_categories.product_id IN (
    94625, 94624, 94623, 94622, 94621, 94620, 
    94619, 94618, 94617, 94616, 94615, 
    94614, 94613, 94612, 94611, 94610, 
    94609, 94608, 94607, 94606, 94605, 
    94604, 94603, 94602, 94601, 94600, 
    94599, 94598, 94597, 94596, 94595, 
    94594, 94593, 95222, 95221, 95220, 
    95219, 94863, 94862, 94697
  ) 
GROUP BY 
  cscart_products_categories.product_id

Query time 0.00080

Explain
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE cscart_products_categories range PRIMARY,pt pt 3 73 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
94593 32,22M 0
94594 32,22M 0
94595 32,22M 0
94596 32,22M 0
94597 32,22M 0
94598 32,22M 0
94599 32,22M 0
94600 32,22M 0
94601 32,22M 0
94602 32,22M 0
94603 32,22M 0
94604 32,22M 0
94605 32,22M 0
94606 32,22M 0
94607 32,22M 0
94608 32,22M 0
94609 32,22M 0
94610 32,22M 0
94611 32,22M 0
94612 32,22M 0
94613 32,22M 0
94614 32,22M 0
94615 32,22M 0
94616 32,22M 0
94617 32,22M 0
94618 32,22M 0
94619 32,22M 0
94620 32,22M 0
94621 32,22M 0
94622 32,22M 0
94623 32,22M 0
94624 32,22M 0
94625 32,22M 0
94697 22M 0
94862 22M 0
94863 22M 0
95219 22M 0
95220 22M 0
95221 22M 0
95222 22M 0