SELECT 
  layout_id 
FROM 
  cscart_bm_locations 
WHERE 
  location_id = 2

Query time 0.00025

JSON explain

{
  "query_block": {
    "select_id": 1,
    "table": {
      "table_name": "cscart_bm_locations",
      "access_type": "const",
      "possible_keys": ["PRIMARY"],
      "key": "PRIMARY",
      "key_length": "3",
      "used_key_parts": ["location_id"],
      "ref": ["const"],
      "rows": 1,
      "filtered": 100
    }
  }
}

Result

layout_id
1