The current MQTT 3.1 specification says that the server adds a grace period 50% to the Keep alive interval before it enforces it.
This is fine for short keep alive intervals but is excessive for longer ones.
The current specification also says that the client should wait for one keep alive interval for a PINGRESP to be sent in response
to its PINGREQ before it gives up and disconnects. Again this is fine for short keep alive intervals but excessive for long ones.