UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DCbmT88POXXDQKRtKnGKVQ93UZDt3cFDlwOTfNOWCXU='
WHERE
key_id = 'd7a0c059e374fd851acf6741a9566f1792cedae30d5ffc424a53354c9d991b50'
AND (
token = 'DCbmT88POXXDQKRtKnGKVQ93UZDt3cFDlwOTfNOWCXU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)