UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/pJ/jrZqlMc2nGmhACo7vZtS4F/ESms6ySpr4jtlt0k='
WHERE
key_id = '672ebb6fcc4c4305d2078a559f56f52ccca1607db3a7e1b492920852c2e1ecde'
AND (
token = '/pJ/jrZqlMc2nGmhACo7vZtS4F/ESms6ySpr4jtlt0k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)