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 (
    96860, 96859, 96858, 96857, 96856, 96855, 
    96854, 96853, 96852, 96851, 96850, 
    96849, 96848, 96058, 96888, 96045, 
    96044, 96042, 96041, 96000, 96690, 
    96689, 96688, 96687, 96686, 96685, 
    96684, 96683, 96682, 96681, 96680, 
    96679, 96678, 96677, 96676, 96643, 
    96640, 96639, 96638, 96637
  ) 
GROUP BY 
  cscart_products_categories.product_id

Query time 0.00089

Explain
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE cscart_products_categories range PRIMARY,pt pt 3 44 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
96000 22M 0
96041 22M 0
96042 22M 0
96044 32,22M 0
96045 32,22M 0
96058 22M 0
96637 22M 0
96638 22M 0
96639 22M 0
96640 22M 0
96643 22M 0
96676 22M 0
96677 22M 0
96678 22M 0
96679 22M 0
96680 22M 0
96681 22M 0
96682 22M 0
96683 22M 0
96684 22M 0
96685 22M 0
96686 22M 0
96687 22M 0
96688 22M 0
96689 22M 0
96690 33,22M 0
96848 22M 0
96849 22M 0
96850 22M 0
96851 22M 0
96852 22M 0
96853 22M 0
96854 22M 0
96855 22M 0
96856 22M 0
96857 22M 0
96858 22M 0
96859 22M 0
96860 22M 0
96888 33,22M 0