UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'aNu6qZ5sVINBLF/4JryP/79dGvAmqw9+RXW1yroAP6c='
WHERE
key_id = '4105d6804d06d3498c848fd0267481611d8694a9ae1ae2e764c97cc1aef7d640'
AND (
token = 'aNu6qZ5sVINBLF/4JryP/79dGvAmqw9+RXW1yroAP6c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)