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 (
    86692, 86670, 86611, 86610, 86609, 86608, 
    87120, 86648, 87460, 87459, 87458, 
    87112, 86644, 86643, 86541, 87352, 
    87351, 87350, 87349, 87348, 87347, 
    87346, 87345, 87344, 87343, 87342, 
    87341, 87240, 87239, 87238, 87237, 
    87236, 87235, 87234, 87233, 87232, 
    87231, 87230, 87229, 87228
  ) 
GROUP BY 
  cscart_products_categories.product_id

Query time 0.00066

Explain
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE cscart_products_categories range PRIMARY,pt pt 3 47 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
86541 22M 0
86608 33,22M 0
86609 33,22M 0
86610 33,22M 0
86611 33,22M 0
86643 22M 0
86644 22M 0
86648 22M 0
86670 22M 0
86692 22M 0
87112 22M 0
87120 22M 0
87228 22M 0
87229 22M 0
87230 22M 0
87231 22M 0
87232 22M 0
87233 22M 0
87234 22M 0
87235 22M 0
87236 22M 0
87237 22M 0
87238 22M 0
87239 22M 0
87240 22M 0
87341 22M 0
87342 22M 0
87343 22M 0
87344 22M 0
87345 22M 0
87346 22M 0
87347 22M 0
87348 22M 0
87349 22M 0
87350 22M 0
87351 22M 0
87352 22M 0
87458 33,22M 0
87459 33,22M 0
87460 33,22M 0