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 = 4 
WHERE 
  cscart_products_categories.product_id IN (
    85113, 78852, 6427, 2237, 2236, 2235, 
    2231, 2233, 2232, 6665, 2227, 2230, 
    2228, 42056, 2225, 6642, 2226, 6457, 
    2223, 2222, 2211, 2221, 2220, 2217, 
    2216, 2214, 2213, 2212, 2218, 2219, 
    2194, 2210, 2209, 2208, 2207, 2206, 
    2205, 2204, 2203, 2202, 2201, 2200, 
    2199, 2198, 2197, 2196, 2195, 2193, 
    2192, 2191, 2190, 2189, 2188, 2187, 
    2186, 2185, 2184, 2183, 2182, 2181, 
    2180, 2179, 2178, 2177, 2176, 2175, 
    2174, 2173, 2172, 6881, 6880, 7042, 
    2170, 2169, 2171, 2167, 2168, 14349, 
    14348, 14345
  ) 
GROUP BY 
  cscart_products_categories.product_id

Query time 0.00143

Explain
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE cscart_products_categories range PRIMARY,pt pt 3 82 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
2167 4M 0
2168 4M 0
2169 4M 0
2170 4M 0
2171 4M 0
2172 4M 0
2173 4M 0
2174 4M 0
2175 4M 0
2176 4M 0
2177 4M 0
2178 4M 0
2179 4M 0
2180 4M 0
2181 4M 0
2182 4M 0
2183 4M 0
2184 4M 0
2185 4M 0
2186 4M 0
2187 21,4M 0
2188 4M 0
2189 4M 0
2190 4M 0
2191 4M 0
2192 4M 0
2193 4M 0
2194 4M 0
2195 4M 0
2196 4M 0
2197 4M 0
2198 21,4M 0
2199 4M 0
2200 4M 0
2201 4M 0
2202 4M 0
2203 4M 0
2204 4M 0
2205 4M 0
2206 4M 0
2207 4M 0
2208 4M 0
2209 4M 0
2210 4M 0
2211 4M 0
2212 4M 0
2213 4M 0
2214 4M 0
2216 4M 0
2217 4M 0
2218 4M 0
2219 4M 0
2220 4M 0
2221 4M 0
2222 4M 0
2223 4M 0
2225 4M 0
2226 4M 0
2227 4M 0
2228 4M 0
2230 4M 0
2231 4M 0
2232 4M 0
2233 4M 0
2235 4M 0
2236 4M 0
2237 4M 0
6427 4M 0
6457 4M 0
6642 4M 0
6665 4M 0
6880 4M 0
6881 4M 0
7042 4M 0
14345 4M 0
14348 4M 0
14349 4M 0
42056 4M 0
78852 4M 0
85113 4M 0