That's something you really should ask your doctor, as he or she is the only one who knows your medical condition and the details of your surgery. (I'm pretty sure that there is no general answer to your question which applies to every situation between ingrown nail and heart surgery.)
When in doubt, I'd always refrain from drinking kava, just to be on the safe side.
I wish you all the best and a fast recovery!