Not sure if exactly what you’re looking for, but Advanced Custom Fields has a custom update message.
Checking its code, it uses:
add_action( 'in_plugin_update_message-' . $hook, array($this, 'in_plugin_update_message'), 10, 2 );
The in_plugin_update_message()
callback method it’s not exactly simple and worth a detailed look. Note that it only works if the plugin is active.