You can do it without the loop. Assign your timestring back into $1 and set $2='' (nullstring). Then just "print" will dump the entire revised line.
1
1
But honestly I might use a shell loop for this instead of awk.
1
cat access.log | while read time rest; do echo $(date -d @$time "+%FT%T")$(echo $time | sed 's/^[0-9]*//')Z $rest; done

May 4, 2021 · 2:00 PM UTC

1