Both are acceptable but with slightly different nuances:
The first suggest that the book had been sold by this time, sooner than one expected e.g. Sorry, you're too late to get it back now.
The second suggests surprise that the book has been sold so soon e.g. I didn't expect it to be bought for a week or so yet.