UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lfuazS0a6K+um5jTKNiaIskZIYRB/Cdv580sV0mJFSI='
WHERE
key_id = '72667d6088cb20583926f0835ba7706c84e1add75997674e7d1c2eae3fa9a70d'
AND (
token = 'lfuazS0a6K+um5jTKNiaIskZIYRB/Cdv580sV0mJFSI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)