Since all you're doing is adding two dashes, and dropping some extra characters, there's not much need for date.
$ sed -Ee 's/(Last Password Change: )(....)(..)(..).*Z/\1\2-\3-\4/' < foo.txt
...
Name: cust foo
mail: [email protected]
Account Lock: FALSE
Last Password Change: 2017-07-21
...
For a stricter pattern, the dots (that match any character) could be replaced with [0-9] to only match digits. \1 etc. in the replacement of course expand to what ever the patterns in parenthesis matched.