SELECT 
  product_id, 
  amount 
FROM 
  cscart_warehouses_sum_products_amount 
WHERE 
  1 
  AND product_id IN (
    51289, 51288, 51287, 51286, 51285, 51284, 
    51283, 8, 51294, 51293, 51291, 51290, 
    94, 142, 62, 141, 27, 22, 23, 18, 86, 51344, 
    120, 51345, 119, 108, 4, 107, 51348, 
    121
  )

Query time 0.00055

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "32.71"
    },
    "table": {
      "table_name": "cscart_warehouses_sum_products_amount",
      "access_type": "range",
      "possible_keys": [
        "PRIMARY"
      ],
      "key": "PRIMARY",
      "used_key_parts": [
        "product_id"
      ],
      "key_length": "3",
      "rows_examined_per_scan": 56,
      "rows_produced_per_join": 56,
      "filtered": "100.00",
      "index_condition": "(`test_uchur_k`.`cscart_warehouses_sum_products_amount`.`product_id` in (51289,51288,51287,51286,51285,51284,51283,8,51294,51293,51291,51290,94,142,62,141,27,22,23,18,86,51344,120,51345,119,108,4,107,51348,121))",
      "cost_info": {
        "read_cost": "27.11",
        "eval_cost": "5.60",
        "prefix_cost": "32.71",
        "data_read_per_join": "896"
      },
      "used_columns": [
        "product_id",
        "amount"
      ]
    }
  }
}

Result

product_id amount
4 15
4 15
8 3
8 3
18 34
18 34
22 8
22 8
23 19
23 19
27 4
27 4
62 20
62 20
86 27
86 27
94 1
94 1
107 17
107 17
108 10
108 10
119 27
119 27
120 25
120 25
121 22
121 22
141 11
141 11
142 12
142 12
51283 4
51283 4
51284 6
51284 6
51285 3
51285 3
51286 1
51286 1
51287 3
51287 3
51288 3
51288 3
51289 3
51289 3
51290 1
51290 1
51291 1
51291 1
51293 1
51293 1
51294 1
51294 1
51344 15
51344 15
51345 20
51345 20
51348 10
51348 10