UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9XiSQRPjK1mATKFLjQT9VpiXpKX4qVM/1kvZCqbKThQ='
WHERE
key_id = '5809584dc6d67fb336c527af9368e7aa64f4602dc378f186e33f8cd2319d0942'
AND (
token = '9XiSQRPjK1mATKFLjQT9VpiXpKX4qVM/1kvZCqbKThQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)