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 (
    60025, 60024, 60023, 60022, 60021, 60020, 
    60019, 60018, 60017, 60016, 60015, 
    60014, 60013, 60012, 60011, 60010, 
    60009, 60008, 60007, 60006
  ) 
GROUP BY 
  cscart_products_categories.product_id

Query time 0.00037

Explain
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE cscart_products_categories range PRIMARY,pt pt 3 20 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
60006 22M
60007 22M
60008 22M
60009 22M
60010 22M
60011 22M
60012 22M
60013 22M
60014 22M
60015 22M
60016 22M
60017 22M
60018 22M
60019 22M
60020 22M
60021 22M
60022 22M
60023 22M
60024 22M
60025 22M