UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mO6x+poz/M04Je/xTExZBaCmqFcj3Y+HHuB1WevIBOU='
WHERE
key_id = '73d3231b402bc1d40290033d9f433be00a8b0990e68c7b86133e15d6f8839411'
AND (
token = 'mO6x+poz/M04Je/xTExZBaCmqFcj3Y+HHuB1WevIBOU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)