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 = 26

Query time 0.00033

JSON explain

{
  "query_block": {
    "select_id": 1,
    "message": "no matching row in const table"
  }
}