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 
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') 
WHERE 
  cscart_products_categories.product_id IN (
    103713, 103712, 103711, 103710, 103709, 
    103708, 103707, 103706, 103705, 103704, 
    103703, 103656, 103655, 103654, 103653, 
    103652, 103651, 103650, 103649, 103648
  ) 
GROUP BY 
  cscart_products_categories.product_id

Query time 0.00041

Explain
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE cscart_products_categories range PRIMARY,pt pt 3 21 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

Result

product_id category_ids
103648 4M
103649 4M
103650 4M
103651 3M
103652 4M
103653 4M
103654 4M
103655 4M
103656 18,13M
103703 3M
103704 3M
103705 3M
103706 4M
103707 4M
103708 4M
103709 3M
103710 4M
103711 4M
103712 3M
103713 4M