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 = 87 
WHERE 
  cscart_products_categories.product_id IN (
    125358, 125461, 125089, 125066, 125487, 
    124934, 125127, 124797, 124795, 124990, 
    124970, 124816, 125134, 125133, 125030, 
    124778, 124470, 124653, 124477, 124475, 
    124857, 124312, 124309, 124180, 124483, 
    124302, 124301, 124033, 124449, 124269
  ) 
GROUP BY 
  cscart_products_categories.product_id

Query time 0.00059

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

Result

product_id category_ids position
124033 87,22M 0
124180 87,22M 0
124269 87,22M 0
124301 87,22M 0
124302 87,22M 0
124309 87,22M 0
124312 87,22M 0
124449 87,22M 0
124470 87,22M 0
124475 87,22M 0
124477 87,22M 0
124483 87,22M 0
124653 87,22M 0
124778 87,22M 0
124795 87,22M 0
124797 87,22M 0
124816 87,22M 0
124857 87,22M 0
124934 87,22M 0
124970 87,22M 0
124990 87,22M 0
125030 87,22M 0
125066 87,22M 0
125089 87,22M 0
125127 87,22M 0
125133 87,22M 0
125134 87,22M 0
125358 87,22M 0
125461 87,22M 0
125487 87,22M 0