SELECT 
  rate_id, 
  rate_value, 
  destination_id, 
  IF(rate_value = '', 0, 1) as rates_defined, 
  base_rate 
FROM 
  cscart_shipping_rates 
WHERE 
  shipping_id = 165 
  AND destination_id = 126

Query time 0.00050

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "1.00"
    },
    "table": {
      "table_name": "cscart_shipping_rates",
      "access_type": "const",
      "possible_keys": [
        "shipping_rate"
      ],
      "key": "shipping_rate",
      "used_key_parts": [
        "shipping_id",
        "destination_id"
      ],
      "key_length": "6",
      "ref": [
        "const",
        "const"
      ],
      "rows_examined_per_scan": 1,
      "rows_produced_per_join": 1,
      "filtered": "100.00",
      "cost_info": {
        "read_cost": "0.00",
        "eval_cost": "0.20",
        "prefix_cost": "0.00",
        "data_read_per_join": "32"
      },
      "used_columns": [
        "rate_id",
        "shipping_id",
        "destination_id",
        "rate_value",
        "base_rate"
      ]
    }
  }
}

Result

rate_id rate_value destination_id rates_defined base_rate
38592 126 1 0.00