UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VF7kzC/hSErhoGooOeBJiqJRIGXmdRvf59x1o9x7MNc='
WHERE
key_id = '853ffbb6b2997f0268f13ab158a901052e98eb2a224824d4f582b8c9406a4327'
AND (
token = 'VF7kzC/hSErhoGooOeBJiqJRIGXmdRvf59x1o9x7MNc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)