UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VWDjCPt6EnN6Cyidopg36tuXyG7Ej6flqcpplapIvyg='
WHERE
key_id = '55ab057c792a6fa2af93afd23198df5d22d7177bfaae744c2cac61994098c9fe'
AND (
token = 'VWDjCPt6EnN6Cyidopg36tuXyG7Ej6flqcpplapIvyg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)