UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'KkShYBIYq1m2uzSU2z01MTmpP/03jgYU5xowA9B1i00='
WHERE
key_id = '760b52e39f5dd953d3b10eb34e265e5c5fd1a488a943cf46de39ffb1bb6aaa9c'
AND (
token = 'KkShYBIYq1m2uzSU2z01MTmpP/03jgYU5xowA9B1i00='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)