UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cEzP7U0t2gjXHYTC5UxbHNYvZAU7tOfsI+ufE009BcY='
WHERE
key_id = '0133fbad3cc77233e728b2d8b3fb60d9975129b93632cfa1948ee7dbc6fca71e'
AND (
token = 'cEzP7U0t2gjXHYTC5UxbHNYvZAU7tOfsI+ufE009BcY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)