Unless the virus was of the type that is made to destroy hardware (very rare and highly unlikely) you have nothing to worry about. In any event if it had one of those types it wouldn't work at all. And no it can't keep a virus in it and give it to your new PC.
Buy it, its fine.