Child exposed to violent and sexual movies at friend

Can a one-time viewing of a violent or sexually explicit film or TV show have negative long-term effects on children? I just learned my primary schooler saw an inappropriate movie while spending the day at a friend's house. What should I do and how can I prevent this happening in the future?