Are there any risks in running 'flush hosts'? Due to an error in my code I got my PC blocked from an active production DB (too many connection errors).
The error calls for me to use 'flush hosts' in order to reset the host cache.

Are there any risks involved in doing so? Will active connections be terminated? Does it do anything beyond just flushing the cache?
No harm. No connection termination. The cache is used only when clients are trying to connect; apparently something is out-of-date in the cache.

(Follup:  The OP tried it and found no side effects.)