The inbound reply hits the public NAT endpoint.
The public port is the reply key
The public NAT endpoint is 203.0.113.5 port 62000.
public port=62000
Protocol is part of the match
The mapping is for protocol 17, the UDP value.
protocol=17
The public key points inward
The public endpoint maps back to private port 40000.
private port=40000
Summary
The reply lookup starts from the public destination endpoint on the inbound tuple.
public port=62000