SELECT 
  product_id, 
  amount 
FROM 
  cscart_warehouses_sum_products_amount 
WHERE 
  1 
  AND product_id IN (
    51007, 51004, 51005, 51010, 51008, 51012, 
    51013, 51011, 51015, 51006, 51021, 
    51016, 51024, 51017, 51019, 51018, 
    51022, 51014, 51045, 51025, 51029, 
    51060, 51027, 51063, 51020, 51067, 
    51028, 51031, 51062, 51042, 51030, 
    51032
  )

Query time 0.00057

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "35.46"
    },
    "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": 61,
      "rows_produced_per_join": 61,
      "filtered": "100.00",
      "index_condition": "(`test_uchur_k`.`cscart_warehouses_sum_products_amount`.`product_id` in (51007,51004,51005,51010,51008,51012,51013,51011,51015,51006,51021,51016,51024,51017,51019,51018,51022,51014,51045,51025,51029,51060,51027,51063,51020,51067,51028,51031,51062,51042,51030,51032))",
      "cost_info": {
        "read_cost": "29.36",
        "eval_cost": "6.10",
        "prefix_cost": "35.46",
        "data_read_per_join": "976"
      },
      "used_columns": [
        "product_id",
        "amount"
      ]
    }
  }
}

Result

product_id amount
51004 2
51004 2
51005 2
51005 2
51006 2
51006 2
51007 5
51007 5
51008 5
51008 5
51010 1
51010 1
51011 1
51011 1
51012 1
51012 1
51013 1
51013 1
51014 1
51014 1
51015 1
51015 1
51016 2
51016 2
51017 2
51017 2
51018 2
51018 2
51019 4
51019 4
51020 5
51020 5
51021 4
51021 4
51022 4
51022 4
51024 4
51024 4
51025 3
51025 3
51027 2
51027 2
51028 3
51028 3
51029 1
51029 1
51030 1
51030 1
51031 2
51031 2
51032 2
51032 2
51042 5
51042 5
51045 5
51045 5
51060 20
51060 20
51062 4
51062 4
51063 5
51063 5
51067 5
51067 5