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 = 7192 
WHERE 
  cscart_products_categories.product_id IN (
    89938, 91504, 82840, 82913, 82986, 83400, 
    83410, 85302, 85399, 85450, 85501, 
    89759, 85348, 86655, 86656, 86724, 
    86725, 86516, 86792, 83293, 83300, 
    86486, 86487, 86762, 86763, 82619, 
    82620, 83422, 83423, 89762, 85093, 
    85179, 85225, 85271, 83221, 83226, 
    85327, 85424, 85475, 85526, 82847, 
    82848, 82920, 82921, 82993, 82994, 
    83477, 83478
  ) 
GROUP BY 
  cscart_products_categories.product_id

Query time 0.00153

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "29.22"
    },
    "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": 51,
            "rows_produced_per_join": 51,
            "filtered": "100.00",
            "using_index": true,
            "cost_info": {
              "read_cost": "5.38",
              "eval_cost": "5.10",
              "prefix_cost": "10.48",
              "data_read_per_join": "816"
            },
            "used_columns": [
              "product_id",
              "category_id",
              "link_type"
            ],
            "attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (89938,91504,82840,82913,82986,83400,83410,85302,85399,85450,85501,89759,85348,86655,86656,86724,86725,86516,86792,83293,83300,86486,86487,86762,86763,82619,82620,83422,83423,89762,85093,85179,85225,85271,83221,83226,85327,85424,85475,85526,82847,82848,82920,82921,82993,82994,83477,83478))"
          }
        },
        {
          "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.75",
              "eval_cost": "0.26",
              "prefix_cost": "28.33",
              "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')))"
          }
        },
        {
          "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": 2,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.64",
              "eval_cost": "0.26",
              "prefix_cost": "29.22",
              "data_read_per_join": "40"
            },
            "used_columns": [
              "product_id",
              "category_id",
              "position"
            ]
          }
        }
      ]
    }
  }
}

Result

product_id category_ids position
82619 7192M 0
82620 7192M 0
82840 7192M 0
82847 7192M 0
82848 7192M 0
82913 7192M 0
82920 7192M 0
82921 7192M 0
82986 7192M 0
82993 7192M 0
82994 7192M 0
83221 7192M 0
83226 7192M 0
83293 7170,7192M 0
83300 7170,7192M 0
83400 7192M 0
83410 7170,7192M 0
83422 7192M 0
83423 7192M 0
83477 7192M 0
83478 7192M 0
85093 7192M 0
85179 7192M 0
85225 7192M 0
85271 7192M 0
85302 7192M 0
85327 7192M 0
85348 7192M 0
85399 7192M 0
85424 7192M 0
85450 7192M 0
85475 7192M 0
85501 7192M 0
85526 7192M 0
86486 7192M 0
86487 7192M 0
86516 7192M 0
86655 7192M 0
86656 7192M 0
86724 7192M 0
86725 7192M 0
86762 7192M 0
86763 7192M 0
86792 7192M 0
89759 7192M 0
89762 7192M 0
89938 7192M 0
91504 7192M 0