UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2E6bM0CWSxfAwYOHyOHyUWMhN5j37L87Zlmc4FyNNiA='
WHERE
key_id = '725b9409d6d07cde67ee42e9de90bdb66f101999384ff627d642812bea9549f5'
AND (
token = '2E6bM0CWSxfAwYOHyOHyUWMhN5j37L87Zlmc4FyNNiA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)