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 = 7144 
WHERE 
  cscart_products_categories.product_id IN (
    100324, 100325, 100326, 100602, 100603, 
    100604, 100605, 100606, 100607, 100608, 
    100609, 100610, 100611, 100654, 100655, 
    100656, 100657, 100658, 100696, 100697, 
    100698, 100699, 100884, 100885, 100886, 
    100887, 100900, 100901, 100902, 100903, 
    100904, 100907, 100908, 100909, 100910, 
    100913, 100914, 100915, 100916, 100917, 
    100918, 100919, 100920, 100921, 100922, 
    101112, 101113, 101114
  ) 
GROUP BY 
  cscart_products_categories.product_id

Query time 0.00155

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "43.48"
    },
    "grouping_operation": {
      "using_filesort": false,
      "nested_loop": [
        {
          "table": {
            "table_name": "cscart_products_categories",
            "access_type": "range",
            "possible_keys": [
              "PRIMARY",
              "link_type",
              "pt"
            ],
            "key": "pt",
            "used_key_parts": [
              "product_id"
            ],
            "key_length": "3",
            "rows_examined_per_scan": 48,
            "rows_produced_per_join": 48,
            "filtered": "100.00",
            "using_index": true,
            "cost_info": {
              "read_cost": "5.08",
              "eval_cost": "4.80",
              "prefix_cost": "9.88",
              "data_read_per_join": "768"
            },
            "used_columns": [
              "product_id",
              "category_id",
              "link_type"
            ],
            "attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (100324,100325,100326,100602,100603,100604,100605,100606,100607,100608,100609,100610,100611,100654,100655,100656,100657,100658,100696,100697,100698,100699,100884,100885,100886,100887,100900,100901,100902,100903,100904,100907,100908,100909,100910,100913,100914,100915,100916,100917,100918,100919,100920,100921,100922,101112,101113,101114))"
          }
        },
        {
          "table": {
            "table_name": "product_position_source",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY",
              "pt"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "category_id",
              "product_id"
            ],
            "key_length": "6",
            "ref": [
              "const",
              "nuie_scalesta_net.cscart_products_categories.product_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 48,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "12.00",
              "eval_cost": "4.80",
              "prefix_cost": "26.68",
              "data_read_per_join": "768"
            },
            "used_columns": [
              "product_id",
              "category_id",
              "position"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_categories",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY",
              "c_status",
              "p_category_id"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "category_id"
            ],
            "key_length": "3",
            "ref": [
              "nuie_scalesta_net.cscart_products_categories.category_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 2,
            "filtered": "5.00",
            "cost_info": {
              "read_cost": "12.00",
              "eval_cost": "0.24",
              "prefix_cost": "43.48",
              "data_read_per_join": "6K"
            },
            "used_columns": [
              "category_id",
              "usergroup_ids",
              "status",
              "storefront_id"
            ],
            "attached_condition": "((`nuie_scalesta_net`.`cscart_categories`.`storefront_id` in (0,1)) and ((`nuie_scalesta_net`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`nuie_scalesta_net`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`nuie_scalesta_net`.`cscart_categories`.`usergroup_ids`))) and (`nuie_scalesta_net`.`cscart_categories`.`status` in ('A','H')))"
          }
        }
      ]
    }
  }
}

Result

product_id category_ids position
100324 7147M
100325 7146M
100326 7145M
100602 7146M
100603 7146M
100604 7146M
100605 7145M
100606 7145M
100607 7147M
100608 7146M
100609 7146M
100610 7145M
100611 7146M
100654 7189M
100655 7189M
100656 7189M
100657 7189M
100658 7189M
100696 7146M
100697 7146M
100698 7146M
100699 7146M
100884 7145M
100885 7147M
100886 7146M
100887 7145M
100900 7145M
100901 7147M
100902 7146M
100903 7145M
100904 7189M
100907 7145M
100908 7147M
100909 7146M
100910 7145M
100913 7145M
100914 7147M
100915 7146M
100916 7145M
100917 7146M
100918 7145M
100919 7145M
100920 7147M
100921 7146M
100922 7145M
101112 7145M
101113 7147M
101114 7146M