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.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 (
    200, 201, 202, 203, 204, 205, 206, 207, 
    208, 209, 190, 210, 211, 212, 213, 214, 
    215, 216, 217, 218, 219, 191, 220, 221, 
    222, 223, 224, 225, 226, 227, 228, 229
  ) 
GROUP BY 
  cscart_products_categories.product_id

Query time 0.00078

JSON explain

{
  "query_block": {
    "select_id": 1,
    "table": {
      "table_name": "cscart_products_categories",
      "access_type": "range",
      "possible_keys": ["PRIMARY", "pt"],
      "key": "pt",
      "key_length": "3",
      "used_key_parts": ["product_id"],
      "rows": 32,
      "filtered": 100,
      "attached_condition": "cscart_products_categories.product_id in (200,201,202,203,204,205,206,207,208,209,190,210,211,212,213,214,215,216,217,218,219,191,220,221,222,223,224,225,226,227,228,229)",
      "using_index": true
    },
    "table": {
      "table_name": "cscart_categories",
      "access_type": "eq_ref",
      "possible_keys": ["PRIMARY", "c_status", "p_category_id"],
      "key": "PRIMARY",
      "key_length": "3",
      "used_key_parts": ["category_id"],
      "ref": ["vietpom_dev.cscart_products_categories.category_id"],
      "rows": 1,
      "filtered": 100,
      "attached_condition": "(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')"
    }
  }
}

Result

product_id category_ids
190 88M
191 88M
200 88M
201 88M
202 88M
203 88M
204 88M
205 88M
206 88M
207 88M
208 88M
209 88M
210 88M
211 88M
212 88M
213 88M
214 88M
215 88M
216 88M
217 88M
218 88M
219 88M
220 88M
221 88M
222 88M
223 88M
224 88M
225 88M
226 88M
227 88M
228 88M
229 88M