A GT 1030 cannot support 2 4k monitors. You'll need a
gtx 1050 for that.
GT 1030 output specifications:
DVI max resolution: 1920x1080 @ 60hz as the gt 1030 dvi outputs are limited to single link dvi.
HDMI max resolution: 3840x2160 @ 30hz which is the max hdmi 1.4 will allow unless you run 4:2:0 subsampling to get 60 hz @ 4k. 5k @ 30 hz is also possible if you use 4:2:2 subsampling.
GTX 1050 output specifications:
DVI max resolution: 2560x1600 @ 60hz due to dual link dvi.
HDMI max resolution: 5120×2880 @ 30 hz which is the max hdmi 2.0b will allow unless you run 4:2:0 subsampling to get 60hz @ 5k. 8k @ 30 hz is also possible if you use 4:2:0 subsampling. 4k @ 60 hz is supported without having to use any subsampling.
Displayport max resolution: 7680×4320 @ 30 hz which is the max dp 1.4 will allow unless you run display stream compression (dsc) to get 8k @ 60 hz. 4k & 5k @ 60 hz is supported without having to use any dsc.
7680x4320 means the card could support up to 33,177,600 pixels. We know this not to be true since the gt 1030 lacks the outputs to do so.
Buying a card that only supports a max of 3840x2160 would mean the card would only be able to support 1 4k monitor.
The gtx 1050 has the same max resolution of the gt 1030, but has sufficient outputs to support 2 4k monitors.
Each 4k monitor is 8,294,400 pixels a piece. 2 4k monitors ran on the gtx 1050 (one on hdmi & one on dp 1.4) would equal 16,588,800 pixels which is well within the 33,177,600 pixel limit.