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 (
    103750, 103749, 103748, 103747, 105270, 
    105269, 105268, 105267, 105266, 105265, 
    105264, 105263, 105218, 105217, 105216, 
    105215, 105214, 105213, 105212, 105211
  ) 
GROUP BY 
  cscart_products_categories.product_id

Query time 0.00042

Explain
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE cscart_products_categories range PRIMARY,pt pt 3 22 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
103747 4M
103748 4M
103749 4M
103750 4M
105211 4M
105212 4M
105213 4M
105214 4M
105215 4M
105216 4M
105217 4M
105218 18,13M
105263 4M
105264 4M
105265 4M
105266 4M
105267 4M
105268 4M
105269 4M
105270 18,13M