Hello, I am Keith, one of the experts on Just Answer, and pleased to be able to help you with your question.
As far as taxation is concerned the loan is irrelevant save that any interest payable thereon is allowable against the trading income for Corporation Tax (CT) purposes.
Assuming that it is the company which holds the shop then Capital Gains Tax (CGT) does not apply as companies are not subject to the CGT regime. Any gain made on the sale ie 640K less the original capital cost of the shop less any improvements forms part of the trading income of the company and will be liable to CT at 20% on disposal.
I do hope that you have found my reply of assistance.