UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vKO4rWo0RqXKJdEqnge3H072IcvbYfKs31kbHSmIhPw='
WHERE
key_id = '53048ef27e7446347d988bfe504f76cc5904fb78f44cd9ecfbbd284c43c1aa75'
AND (
token = 'vKO4rWo0RqXKJdEqnge3H072IcvbYfKs31kbHSmIhPw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)