update password if within the given time