SELECT 
  state_id 
FROM 
  cscart_states 
WHERE 
  code = 'Kampala' 
  AND country_code = 'UG'

Query time 0.00038

JSON explain

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