UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zrI/lP+7uEcIxXqBqEgOXkUWe5pq0qsjYtX9fF5pv4o='
WHERE
key_id = '30c23ecda0e2ac5e4b654cc61cbaef8eb18e2292aff4be074a064786b87265c3'
AND (
token = 'zrI/lP+7uEcIxXqBqEgOXkUWe5pq0qsjYtX9fF5pv4o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)