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 (
    73795, 73794, 73793, 73792, 73791, 73790, 
    73789, 73788, 73787, 73434, 73433, 
    73432, 73431, 73430, 73429, 73428, 
    73427, 73426, 73425, 73424
  ) 
GROUP BY 
  cscart_products_categories.product_id

Query time 0.00038

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
73424 1M
73425 1M
73426 1M
73427 1M
73428 1M
73429 1M
73430 1M
73431 1M
73432 1M
73433 1M
73434 17,13M
73787 22M
73788 22M
73789 22M
73790 22M
73791 22M
73792 22M
73793 22M
73794 22M
73795 22M