During the month of ramadan, one of the days I had to stop eating and drinking at 3:37 in the morning and while drinking water, I realised that 20 seconds had past 3:37.

I was just curious as to if my fasting for that day would count or I had to keep a qadha fast considering I only drank water 20 seconds past the time I was supposed to stop.

First of all please tell if 3:37 was adhan time on that day or it was just timing to stop suhur. Sometimes in Namaz timing chart it is written Imsac time and then Adhan Time and normally there is 15 minutes gap between these two things. If it I was imsac timing then your fast is valid you are authorized to eat and drink till Adhan time but if it was exact adhan time and you knew and when you realized that you have crossed the time and the water you had in you mouth have swallowed it,then your fast will be invalid and you have to pay both Qadha and Kaffara for that day fast.

If you didn’t know the exact timing and and without enquiry you drunk water then your fast is invalid and later realized that you had eaten after finishing the time thenyou has do do Qadha of that day.

Ruling 1553. If someone realises while eating that it has become ṣubḥ, he must take the food out from his mouth; and in the event that he intentionally swallows it, his fast is invalid. Furthermore, in accordance with the rules that will be mentioned later, kaffārah also becomes obligatory on him.